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) {
|
Future<Amount> estimateFeeFor(Amount amount, int feeRate) {
|
||||||
// fees are always 0 :)
|
// fees are always 0 :)
|
||||||
return Future.value(
|
return Future.value(
|
||||||
Amount(rawValue: BigInt.from(0), fractionDigits: coin.decimals));
|
Amount(
|
||||||
|
rawValue: BigInt.from(0),
|
||||||
|
fractionDigits: coin.decimals,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -302,8 +306,15 @@ class BananoWallet extends CoinServiceAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
// TODO: implement fees
|
// Banano 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 {
|
Future<void> updateBalance() async {
|
||||||
final body = jsonEncode({
|
final body = jsonEncode({
|
||||||
|
@ -744,7 +755,7 @@ class BananoWallet extends CoinServiceAPI
|
||||||
);
|
);
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
Logging.instance.log(
|
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,
|
level: LogLevel.Warning,
|
||||||
);
|
);
|
||||||
GlobalEventBus.instance.fire(
|
GlobalEventBus.instance.fire(
|
||||||
|
|
|
@ -313,7 +313,14 @@ class NanoWallet extends CoinServiceAPI
|
||||||
|
|
||||||
@override
|
@override
|
||||||
// Nano has no fees
|
// 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 {
|
Future<void> updateBalance() async {
|
||||||
final body = jsonEncode({
|
final body = jsonEncode({
|
||||||
|
@ -754,7 +761,11 @@ class NanoWallet extends CoinServiceAPI
|
||||||
coin,
|
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(
|
GlobalEventBus.instance.fire(
|
||||||
WalletSyncStatusChangedEvent(
|
WalletSyncStatusChangedEvent(
|
||||||
WalletSyncStatus.unableToSync,
|
WalletSyncStatus.unableToSync,
|
||||||
|
|
Loading…
Reference in a new issue