feat: Update next example and add backup to federation#222
feat: Update next example and add backup to federation#222MrImmortal09 wants to merge 14 commits intomainfrom
Conversation
|
8241d8c to
4efb05b
Compare
| await wallet.recovery.backupToFederation({ | ||
| // [!code focus] | ||
| timestamp: Date.now(), // [!code focus] | ||
| note: 'My backup', // [!code focus] | ||
| }) // [!code focus] |
| 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] |
|
|
||
| ### `recovery.backupToFederation(metadata?: JSONValue)` | ||
|
|
||
| Backup the wallet state to the federation with optional metadata. |
There was a problem hiding this comment.
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"
|
Size Change: +30 B (0%) Total Size: 7.64 MB
ℹ️ View Unchanged
|
c20e0cb to
d21e0ee
Compare
alexlwn123
left a comment
There was a problem hiding this comment.
Looks great. Please add tests for the new backup/recovery functions.
feat: add backup to federation in example
are inaccessible during recovery of a wallet.


Changes done in this PR:
backupToFederationmethod in RecoveryService