update tests

This commit is contained in:
julian 2023-03-24 15:55:17 -06:00
parent f7b2f01f01
commit 7e6642cd84
3 changed files with 27 additions and 0 deletions

View file

@ -18,6 +18,7 @@ import 'package:stackwallet/models/paymint/transactions_model.dart' as old;
import 'package:stackwallet/services/coins/firo/firo_wallet.dart'; import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart';
import 'package:stackwallet/utilities/address_utils.dart'; import 'package:stackwallet/utilities/address_utils.dart';
import 'package:stackwallet/utilities/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
@ -97,6 +98,10 @@ void main() {
? TransactionSubType.join ? TransactionSubType.join
: TransactionSubType.none, : TransactionSubType.none,
amount: t.amount, amount: t.amount,
amountString: Amount(
rawValue: BigInt.from(t.amount),
fractionDigits: Coin.firo.decimals,
).toJsonString(),
fee: t.fees, fee: t.fees,
height: t.height, height: t.height,
isCancelled: t.isCancelled, isCancelled: t.isCancelled,

View file

@ -8,6 +8,7 @@ import 'package:stackwallet/models/paymint/fee_object_model.dart';
import 'package:stackwallet/services/coins/coin_service.dart'; import 'package:stackwallet/services/coins/coin_service.dart';
import 'package:stackwallet/services/coins/firo/firo_wallet.dart'; import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
import 'package:stackwallet/services/coins/manager.dart'; import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/utilities/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'manager_test.mocks.dart'; import 'manager_test.mocks.dart';
@ -103,6 +104,10 @@ void main() {
type: TransactionType.incoming, type: TransactionType.incoming,
subType: TransactionSubType.mint, subType: TransactionSubType.mint,
amount: 123, amount: 123,
amountString: Amount(
rawValue: BigInt.from(123),
fractionDigits: wallet.coin.decimals,
).toJsonString(),
fee: 3, fee: 3,
height: 123, height: 123,
isCancelled: false, isCancelled: false,

View file

@ -17,6 +17,7 @@ import 'package:stackwallet/services/locale_service.dart';
import 'package:stackwallet/services/notes_service.dart'; import 'package:stackwallet/services/notes_service.dart';
import 'package:stackwallet/services/price_service.dart'; import 'package:stackwallet/services/price_service.dart';
import 'package:stackwallet/services/wallets.dart'; import 'package:stackwallet/services/wallets.dart';
import 'package:stackwallet/utilities/amount.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/prefs.dart'; import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart';
@ -51,6 +52,10 @@ void main() {
timestamp: 1648595998, timestamp: 1648595998,
type: TransactionType.outgoing, type: TransactionType.outgoing,
amount: 100000000, amount: 100000000,
amountString: Amount(
rawValue: BigInt.from(100000000),
fractionDigits: Coin.firo.decimals,
).toJsonString(),
fee: 3794, fee: 3794,
height: 450123, height: 450123,
subType: TransactionSubType.none, subType: TransactionSubType.none,
@ -152,6 +157,10 @@ void main() {
timestamp: 1648595998, timestamp: 1648595998,
type: TransactionType.outgoing, type: TransactionType.outgoing,
amount: 9659, amount: 9659,
amountString: Amount(
rawValue: BigInt.from(9659),
fractionDigits: Coin.firo.decimals,
).toJsonString(),
fee: 3794, fee: 3794,
height: 450123, height: 450123,
subType: TransactionSubType.mint, subType: TransactionSubType.mint,
@ -250,6 +259,10 @@ void main() {
timestamp: 1648595998, timestamp: 1648595998,
type: TransactionType.incoming, type: TransactionType.incoming,
amount: 100000000, amount: 100000000,
amountString: Amount(
rawValue: BigInt.from(100000000),
fractionDigits: Coin.firo.decimals,
).toJsonString(),
fee: 3794, fee: 3794,
height: 450123, height: 450123,
subType: TransactionSubType.none, subType: TransactionSubType.none,
@ -342,6 +355,10 @@ void main() {
timestamp: 1648595998, timestamp: 1648595998,
type: TransactionType.outgoing, type: TransactionType.outgoing,
amount: 100000000, amount: 100000000,
amountString: Amount(
rawValue: BigInt.from(100000000),
fractionDigits: Coin.firo.decimals,
).toJsonString(),
fee: 3794, fee: 3794,
height: 450123, height: 450123,
subType: TransactionSubType.none, subType: TransactionSubType.none,