From 74f0226c15c0ed75c6cd83d2395c79d19cb83df6 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Sat, 14 Jul 2018 21:15:55 +0100 Subject: [PATCH] FIX --- class/app-storage.js | 5 ++++- class/legacy-wallet.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/class/app-storage.js b/class/app-storage.js index 5559c4ea..7a0dcefa 100644 --- a/class/app-storage.js +++ b/class/app-storage.js @@ -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); diff --git a/class/legacy-wallet.js b/class/legacy-wallet.js index e1966e25..ebe47768 100644 --- a/class/legacy-wallet.js +++ b/class/legacy-wallet.js @@ -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);