Skip to content

Commit

Permalink
fix: clear previously cached bearer token on backup client setup
Browse files Browse the repository at this point in the history
fix: return self check after error
  • Loading branch information
Jasonvdb committed Oct 4, 2023
1 parent d8fb401 commit e5aa676
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/Dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ const Dev = (): ReactElement => {
const backupCheckRes = await ldk.backupSelfCheck();
if (backupCheckRes.isErr()) {
console.error('Backup check failed', backupCheckRes.error);
setMessage(backupCheckRes.error.message);
return setMessage(backupCheckRes.error.message);
}
setMessage('Backup server check passed ✅');
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class BackupClient {
this.network = network
this.server = server
this.serverPubKey = serverPubKey
this.cachedBearer = null

LdkEventEmitter.send(
EventTypes.native_log,
Expand Down
1 change: 1 addition & 0 deletions lib/ios/Classes/BackupClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class BackupClient {
Self.network = network
Self.server = server
Self.serverPubKey = serverPubKey
Self.cachedBearer = nil

LdkEventEmitter.shared.send(withEvent: .native_log, body: "BackupClient setup for synchronous remote persistence. Server: \(server)")
}
Expand Down

0 comments on commit e5aa676

Please sign in to comment.