Browse Source

FIX

localNotifications
Overtorment 6 years ago
parent
commit
74f0226c15
  1. 5
      class/app-storage.js
  2. 2
      class/legacy-wallet.js

5
class/app-storage.js

@ -1,5 +1,5 @@
import { AsyncStorage } from 'react-native'; import { AsyncStorage } from 'react-native';
import { LegacyWallet, SegwitP2SHWallet, SegwitBech32Wallet } from './'; import { WatchOnlyWallet, LegacyWallet, SegwitP2SHWallet, SegwitBech32Wallet } from './';
let encryption = require('../encryption'); let encryption = require('../encryption');
export class AppStorage { export class AppStorage {
@ -127,6 +127,9 @@ export class AppStorage {
case 'segwitP2SH': case 'segwitP2SH':
unserializedWallet = SegwitP2SHWallet.fromJson(key); unserializedWallet = SegwitP2SHWallet.fromJson(key);
break; break;
case 'watchOnly':
unserializedWallet = WatchOnlyWallet.fromJson(key);
break;
case 'legacy': case 'legacy':
default: default:
unserializedWallet = LegacyWallet.fromJson(key); unserializedWallet = LegacyWallet.fromJson(key);

2
class/legacy-wallet.js

@ -92,7 +92,7 @@ export class LegacyWallet extends AbstractWallet {
); );
let json = response.body; let json = response.body;
if (typeof json === 'undefined' || typeof json.final_balance === 'undefined') { 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); this.balance = new BigNumber(json.final_balance);

Loading…
Cancel
Save