mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-17 14:04:20 +01:00
Add Config (#267)
* Add config * Add rustdocs to Config, send_payment (#271) --------- Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
This commit is contained in:
7
packages/react-native/example/App.js
vendored
7
packages/react-native/example/App.js
vendored
@@ -8,7 +8,7 @@
|
||||
|
||||
import React, { useState } from "react"
|
||||
import { SafeAreaView, ScrollView, StatusBar, Text, TouchableOpacity, View } from "react-native"
|
||||
import { addEventListener, Network, getInfo, connect, removeEventListener } from "@breeztech/react-native-breez-liquid-sdk"
|
||||
import { addEventListener, connect, defaultConfig, getInfo, Network, removeEventListener } from "@breeztech/react-native-breez-liquid-sdk"
|
||||
import { generateMnemonic } from "@dreson4/react-native-quick-bip39"
|
||||
import { getSecureItem, setSecureItem } from "./utils/storage"
|
||||
|
||||
@@ -49,7 +49,10 @@ const App = () => {
|
||||
setSecureItem(MNEMONIC_STORE, mnemonic)
|
||||
}
|
||||
|
||||
await connect({ mnemonic, network: Network.LIQUID_TESTNET })
|
||||
const config = await defaultConfig(Network.TESTNET)
|
||||
addLine("defaultConfig", JSON.stringify(config))
|
||||
|
||||
await connect({ config, mnemonic })
|
||||
addLine("connect", null)
|
||||
|
||||
listenerId = await addEventListener(eventHandler)
|
||||
|
||||
Reference in New Issue
Block a user