mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
WIP: ldk improv
This commit is contained in:
parent
4e677650b5
commit
3046b8e6ef
5 changed files with 10 additions and 8 deletions
|
@ -138,7 +138,8 @@ export default class SyncedAsyncStorage {
|
|||
if (+remoteSeqNum > +localSeqNum) {
|
||||
console.log('remote storage is ahead, need to sync;', +remoteSeqNum, '>', +localSeqNum);
|
||||
|
||||
for (const key of await this.getAllKeysRemote()) {
|
||||
// sort to ensure channel_manager comes first
|
||||
for (const key of (await this.getAllKeysRemote()).sort()) {
|
||||
const value = await this.getItemRemote(key);
|
||||
await AsyncStorage.setItem(this.namespace + '_' + key, value);
|
||||
console.log('synced', key, 'to', value);
|
||||
|
|
|
@ -60,10 +60,6 @@ export class LightningLdkWallet extends LightningCustodianWallet {
|
|||
return false;
|
||||
}
|
||||
|
||||
async start(entropyHex: string) {
|
||||
return RnLdk.start(entropyHex);
|
||||
}
|
||||
|
||||
async stop() {
|
||||
return RnLdk.stop();
|
||||
}
|
||||
|
@ -233,6 +229,10 @@ export class LightningLdkWallet extends LightningCustodianWallet {
|
|||
return ret;
|
||||
}
|
||||
|
||||
getStorageNamespace() {
|
||||
return RnLdk.getStorage().namespace;
|
||||
}
|
||||
|
||||
static async _decodeInvoice(invoice: string) {
|
||||
return bolt11.decode(invoice);
|
||||
}
|
||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -20924,8 +20924,8 @@
|
|||
}
|
||||
},
|
||||
"rn-ldk": {
|
||||
"version": "git+https://github.com/BlueWallet/rn-ldk.git#v0.6.0",
|
||||
"from": "git+https://github.com/BlueWallet/rn-ldk.git#v0.6.0"
|
||||
"version": "git+https://github.com/BlueWallet/rn-ldk.git#v0.6.1",
|
||||
"from": "git+https://github.com/BlueWallet/rn-ldk.git#v0.6.1"
|
||||
},
|
||||
"rn-nodeify": {
|
||||
"version": "10.3.0",
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
"react-test-render": "1.1.2",
|
||||
"readable-stream": "3.6.0",
|
||||
"realm": "10.9.1",
|
||||
"rn-ldk": "git+https://github.com/BlueWallet/rn-ldk.git#v0.6.0",
|
||||
"rn-ldk": "git+https://github.com/BlueWallet/rn-ldk.git#v0.6.1",
|
||||
"rn-nodeify": "10.3.0",
|
||||
"scryptsy": "2.1.0",
|
||||
"secure-random": "1.1.2",
|
||||
|
|
|
@ -91,6 +91,7 @@ const LdkViewLogs = () => {
|
|||
let nfo = 'num peers: ' + peers.length;
|
||||
nfo += '\nnum channels: ' + listChannels.length;
|
||||
nfo += '\nldk binary version: ' + version;
|
||||
nfo += '\nstorage namespace: ' + wallet.getStorageNamespace();
|
||||
setInfo(nfo);
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue