File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
routes/setup/migrate/views Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1357,6 +1357,7 @@ export const resetMigrationState = (): void => {
13571357 migrationAddress . set ( null )
13581358 accounts . set ( [ ] )
13591359 migrationLog . set ( [ ] )
1360+ totalMigratedBalance . set ( 0 )
13601361}
13611362
13621363/**
@@ -1424,7 +1425,7 @@ export const hasMigratedAndConfirmedSomeSelectedBundles = derived(get(migration)
14241425/**
14251426 * Total migration balance
14261427 */
1427- export const totalMigratedBalance = derived ( get ( migration ) . data , ( data ) => data . balance )
1428+ export const totalMigratedBalance = writable < number > ( 0 )
14281429
14291430/**
14301431 * Determines if all spent addresses have low (less than MINIMUM MIGRATION) balance
Original file line number Diff line number Diff line change 1717 migrationLog ,
1818 prepareMigrationLog ,
1919 sendOffLedgerMigrationRequest ,
20+ totalMigratedBalance ,
2021 unselectedInputs ,
2122 } from ' shared/lib/migration'
2223 import { showAppNotification } from ' shared/lib/notifications'
100101 requestId: receipt ?.request ?.requestId || ' ' ,
101102 }))
102103 )
104+ totalMigratedBalance .set (migratableBalance )
103105 loading = false
104106 if ($newProfile ) {
105107 // Save profile
139141 requestId: receipt ?.request ?.requestId || ' ' ,
140142 }))
141143 )
144+ totalMigratedBalance .set (migratableBalance )
142145 loading = false
143146 if ($newProfile ) {
144147 // Save profile
Original file line number Diff line number Diff line change 2323 migrationLog ,
2424 prepareMigrationLog ,
2525 sendOffLedgerMigrationRequest ,
26+ totalMigratedBalance ,
2627 unmigratedBundles ,
2728 } from ' shared/lib/migration'
2829 import { closePopup , popupState } from ' shared/lib/popup'
242243 requestId: receipt ?.request ?.requestId || ' ' ,
243244 }),
244245 ])
246+ totalMigratedBalance .update ((value ) => (value += transaction .balance ))
245247
246248 if (! hasBroadcastAnyBundle ) {
247249 hasBroadcastAnyBundle = true
266268 }),
267269 ])
268270 // todo: handle receipt data
271+ totalMigratedBalance .update ((value ) => (value += transaction .balance ))
269272 // is this needed?
270273 if (! hasBroadcastAnyBundle ) {
271274 hasBroadcastAnyBundle = true
You can’t perform that action at this time.
0 commit comments