Revert "FIX: Dismiss modal after success import"

This reverts commit 5b1515ee3f.
This commit is contained in:
Overtorment 2019-12-14 14:24:12 +00:00
parent bdb9add2e2
commit 703196d4d1

View File

@ -90,9 +90,9 @@ export default class ScanQrWif extends React.Component {
BlueApp.wallets.push(hd); BlueApp.wallets.push(hd);
await BlueApp.saveToDisk(); await BlueApp.saveToDisk();
alert(loc.wallets.import.success); alert(loc.wallets.import.success);
this.props.navigation.popToTop();
setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500); setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500);
this.setState({ isLoading: false }); this.setState({ isLoading: false });
this.props.navigation.dismiss();
return; return;
} }
} }
@ -117,9 +117,9 @@ export default class ScanQrWif extends React.Component {
BlueApp.wallets.push(hd); BlueApp.wallets.push(hd);
await BlueApp.saveToDisk(); await BlueApp.saveToDisk();
alert(loc.wallets.import.success); alert(loc.wallets.import.success);
this.props.navigation.popToTop();
setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500); setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500);
this.setState({ isLoading: false }); this.setState({ isLoading: false });
this.props.navigation.dismiss();
return; return;
} }
} }
@ -144,9 +144,9 @@ export default class ScanQrWif extends React.Component {
await hd.fetchTransactions(); await hd.fetchTransactions();
await BlueApp.saveToDisk(); await BlueApp.saveToDisk();
alert(loc.wallets.import.success); alert(loc.wallets.import.success);
this.props.navigation.popToTop();
setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500); setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500);
this.setState({ isLoading: false }); this.setState({ isLoading: false });
this.props.navigation.dismiss();
return; return;
} }
// nope // nope
@ -179,11 +179,11 @@ export default class ScanQrWif extends React.Component {
BlueApp.wallets.push(lnd); BlueApp.wallets.push(lnd);
lnd.setLabel(loc.wallets.import.imported + ' ' + lnd.typeReadable); lnd.setLabel(loc.wallets.import.imported + ' ' + lnd.typeReadable);
this.props.navigation.popToTop();
alert(loc.wallets.import.success); alert(loc.wallets.import.success);
await BlueApp.saveToDisk(); await BlueApp.saveToDisk();
setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500); setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500);
this.setState({ isLoading: false }); this.setState({ isLoading: false });
this.props.navigation.dismiss();
return; return;
} }
// nope // nope
@ -208,9 +208,9 @@ export default class ScanQrWif extends React.Component {
await watchOnly.fetchBalance(); await watchOnly.fetchBalance();
await watchOnly.fetchTransactions(); await watchOnly.fetchTransactions();
await BlueApp.saveToDisk(); await BlueApp.saveToDisk();
this.props.navigation.popToTop();
setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500); setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500);
this.setState({ isLoading: false }); this.setState({ isLoading: false });
this.props.navigation.dismiss();
return; return;
} }
// nope // nope
@ -235,8 +235,8 @@ export default class ScanQrWif extends React.Component {
await newLegacyWallet.fetchBalance(); await newLegacyWallet.fetchBalance();
await newLegacyWallet.fetchTransactions(); await newLegacyWallet.fetchTransactions();
await BlueApp.saveToDisk(); await BlueApp.saveToDisk();
this.props.navigation.popToTop();
setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500); setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500);
this.props.navigation.dismiss();
return; return;
} }
@ -257,7 +257,7 @@ export default class ScanQrWif extends React.Component {
alert(loc.wallets.scanQrWif.imported_wif + ret.data + loc.wallets.scanQrWif.with_address + newWallet.getAddress()); alert(loc.wallets.scanQrWif.imported_wif + ret.data + loc.wallets.scanQrWif.with_address + newWallet.getAddress());
} }
await BlueApp.saveToDisk(); await BlueApp.saveToDisk();
this.props.navigation.dismiss(); this.props.navigation.popToTop();
setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500); setTimeout(() => EV(EV.enum.WALLETS_COUNT_CHANGED), 500);
}; // end }; // end
@ -337,8 +337,8 @@ export default class ScanQrWif extends React.Component {
ScanQrWif.propTypes = { ScanQrWif.propTypes = {
navigation: PropTypes.shape({ navigation: PropTypes.shape({
dismiss: PropTypes.func,
goBack: PropTypes.func, goBack: PropTypes.func,
popToTop: PropTypes.func,
navigate: PropTypes.func, navigate: PropTypes.func,
}), }),
}; };