mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
FIX
This commit is contained in:
parent
7ba781db51
commit
74f0226c15
@ -1,5 +1,5 @@
|
||||
import { AsyncStorage } from 'react-native';
|
||||
import { LegacyWallet, SegwitP2SHWallet, SegwitBech32Wallet } from './';
|
||||
import { WatchOnlyWallet, LegacyWallet, SegwitP2SHWallet, SegwitBech32Wallet } from './';
|
||||
let encryption = require('../encryption');
|
||||
|
||||
export class AppStorage {
|
||||
@ -127,6 +127,9 @@ export class AppStorage {
|
||||
case 'segwitP2SH':
|
||||
unserializedWallet = SegwitP2SHWallet.fromJson(key);
|
||||
break;
|
||||
case 'watchOnly':
|
||||
unserializedWallet = WatchOnlyWallet.fromJson(key);
|
||||
break;
|
||||
case 'legacy':
|
||||
default:
|
||||
unserializedWallet = LegacyWallet.fromJson(key);
|
||||
|
@ -92,7 +92,7 @@ export class LegacyWallet extends AbstractWallet {
|
||||
);
|
||||
let json = response.body;
|
||||
if (typeof json === 'undefined' || typeof json.final_balance === 'undefined') {
|
||||
throw new Error('Could not fetch UTXO from API' + response.err);
|
||||
throw new Error('Could not fetch balance from API: ' + response.err + ' ' + JSON.stringify(response.body));
|
||||
}
|
||||
|
||||
this.balance = new BigNumber(json.final_balance);
|
||||
|
Loading…
Reference in New Issue
Block a user