mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
add more logging and return zero fees
This commit is contained in:
parent
81970af4a4
commit
3c026ab730
2 changed files with 28 additions and 6 deletions
|
@ -293,7 +293,11 @@ class BananoWallet extends CoinServiceAPI
|
|||
Future<Amount> estimateFeeFor(Amount amount, int feeRate) {
|
||||
// fees are always 0 :)
|
||||
return Future.value(
|
||||
Amount(rawValue: BigInt.from(0), fractionDigits: coin.decimals));
|
||||
Amount(
|
||||
rawValue: BigInt.from(0),
|
||||
fractionDigits: coin.decimals,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -302,8 +306,15 @@ class BananoWallet extends CoinServiceAPI
|
|||
}
|
||||
|
||||
@override
|
||||
// TODO: implement fees
|
||||
Future<FeeObject> get fees => throw UnimplementedError();
|
||||
// Banano has no fees
|
||||
Future<FeeObject> get fees async => FeeObject(
|
||||
numberOfBlocksFast: 1,
|
||||
numberOfBlocksAverage: 1,
|
||||
numberOfBlocksSlow: 1,
|
||||
fast: 0,
|
||||
medium: 0,
|
||||
slow: 0,
|
||||
);
|
||||
|
||||
Future<void> updateBalance() async {
|
||||
final body = jsonEncode({
|
||||
|
@ -744,7 +755,7 @@ class BananoWallet extends CoinServiceAPI
|
|||
);
|
||||
} catch (e, s) {
|
||||
Logging.instance.log(
|
||||
"Failed to refresh banano wallet \'$walletName\': $e\n$s",
|
||||
"Failed to refresh banano wallet $walletId: '$walletName': $e\n$s",
|
||||
level: LogLevel.Warning,
|
||||
);
|
||||
GlobalEventBus.instance.fire(
|
||||
|
|
|
@ -313,7 +313,14 @@ class NanoWallet extends CoinServiceAPI
|
|||
|
||||
@override
|
||||
// Nano has no fees
|
||||
Future<FeeObject> get fees => throw UnimplementedError();
|
||||
Future<FeeObject> get fees async => FeeObject(
|
||||
numberOfBlocksFast: 1,
|
||||
numberOfBlocksAverage: 1,
|
||||
numberOfBlocksSlow: 1,
|
||||
fast: 0,
|
||||
medium: 0,
|
||||
slow: 0,
|
||||
);
|
||||
|
||||
Future<void> updateBalance() async {
|
||||
final body = jsonEncode({
|
||||
|
@ -754,7 +761,11 @@ class NanoWallet extends CoinServiceAPI
|
|||
coin,
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
} catch (e, s) {
|
||||
Logging.instance.log(
|
||||
"Failed to refresh nano wallet $walletId: '$walletName': $e\n$s",
|
||||
level: LogLevel.Warning,
|
||||
);
|
||||
GlobalEventBus.instance.fire(
|
||||
WalletSyncStatusChangedEvent(
|
||||
WalletSyncStatus.unableToSync,
|
||||
|
|
Loading…
Reference in a new issue