mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-07-22 07:48:28 +00:00
Agree to updated TCs
This commit is contained in:
@@ -11,7 +11,7 @@ import {NwcStoreModel} from './NwcStore'
|
||||
import {AuthStoreModel} from './AuthStore'
|
||||
import { log } from '../services'
|
||||
|
||||
export const rootStoreModelVersion = 36 // Update this if model changes require migrations defined in setupRootStore.ts
|
||||
export const rootStoreModelVersion = 37 // Update this if model changes require migrations defined in setupRootStore.ts
|
||||
/**
|
||||
* A RootStore model.
|
||||
*/
|
||||
|
||||
@@ -240,6 +240,7 @@ export async function setupRootStore(rootStore: RootStore, opts: SetupRootStoreO
|
||||
async function _runMigrations(rootStore: RootStore, restoredState: any) {
|
||||
const {
|
||||
transactionsStore,
|
||||
userSettingsStore
|
||||
} = rootStore
|
||||
|
||||
const currentVersion = rootStore.version
|
||||
@@ -350,6 +351,11 @@ async function _runMigrations(rootStore: RootStore, restoredState: any) {
|
||||
}
|
||||
}
|
||||
|
||||
if(currentVersion < 37) {
|
||||
// New onboarding and TCs agreement
|
||||
userSettingsStore.setIsOnboarded(false)
|
||||
}
|
||||
|
||||
// Set once, after all steps succeed: if any step throws, the version is
|
||||
// NOT bumped and the whole migration retries on the next launch.
|
||||
rootStore.setVersion(rootStoreModelVersion)
|
||||
|
||||
Reference in New Issue
Block a user