-
Notifications
You must be signed in to change notification settings - Fork 38
feat: Update next example and add backup to federation #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
feat: add backup to federation in example
|
8241d8c to
4efb05b
Compare
| await wallet.recovery.backupToFederation({ | ||
| // [!code focus] | ||
| timestamp: Date.now(), // [!code focus] | ||
| note: 'My backup', // [!code focus] | ||
| }) // [!code focus] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const unsubscribe = wallet.recovery.subscribeToRecoveryProgress( | ||
| // [!code focus] | ||
| (progress) => { | ||
| // [!code focus] | ||
| console.log('Module:', progress.module_id) // [!code focus] | ||
| console.log('Progress:', progress.progress) // [!code focus] | ||
| }, // [!code focus] | ||
| (error) => { | ||
| // [!code focus] | ||
| // [!code focus] | ||
| console.error('Recovery error:', error) // [!code focus] | ||
| }, // [!code focus] | ||
| ) // [!code focus] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| ### `recovery.backupToFederation(metadata?: JSONValue)` | ||
|
|
||
| Backup the wallet state to the federation with optional metadata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add a sentance that explains to the user how this should be used.
something like: "You should call this function periodically to refresh the user's backups"
docs/core/FedimintWallet/RecoveryService/waitForAllRecoveries.md
Outdated
Show resolved
Hide resolved
docs/core/FedimintWallet/RecoveryService/waitForAllRecoveries.md
Outdated
Show resolved
Hide resolved
|
Size Change: +29 B (0%) Total Size: 7.64 MB
ℹ️ View Unchanged
|
are inaccessible during recovery of a wallet.
8b2a867 to
694d52c
Compare
694d52c to
dd4b38e
Compare
c20e0cb to
d21e0ee
Compare


Changes done in this PR:
backupToFederationmethod in RecoveryService