fix: banano address type

This commit is contained in:
julian 2023-06-07 14:33:53 -06:00
parent 3a58955f60
commit dd7792195c

View file

@ -533,21 +533,17 @@ class BananoWallet extends CoinServiceAPI
numberOfMessages: null, numberOfMessages: null,
); );
Address address = Address( Address address = transactionType == TransactionType.incoming
walletId: walletId, ? receivingAddress
publicKey: [], : Address(
value: transactionType == TransactionType.incoming walletId: walletId,
? publicAddress publicKey: [],
: tx["account"].toString(), value: tx["account"].toString(),
derivationIndex: 0, derivationIndex: 0,
derivationPath: null, derivationPath: null,
type: transactionType == TransactionType.incoming type: AddressType.banano,
? AddressType.nonWallet subType: AddressSubType.nonWallet,
: AddressType.banano, );
subType: transactionType == TransactionType.incoming
? AddressSubType.receiving
: AddressSubType.nonWallet,
);
Tuple2<Transaction, Address> tuple = Tuple2(transaction, address); Tuple2<Transaction, Address> tuple = Tuple2(transaction, address);
transactionList.add(tuple); transactionList.add(tuple);
} }
@ -611,7 +607,7 @@ class BananoWallet extends CoinServiceAPI
publicKey: [], // TODO: add public key publicKey: [], // TODO: add public key
derivationIndex: 0, derivationIndex: 0,
derivationPath: null, derivationPath: null,
type: AddressType.unknown, type: AddressType.banano,
subType: AddressSubType.receiving, subType: AddressSubType.receiving,
); );
@ -706,10 +702,10 @@ class BananoWallet extends CoinServiceAPI
final address = Address( final address = Address(
walletId: walletId, walletId: walletId,
value: publicAddress, value: publicAddress,
publicKey: [], // TODO: add public key publicKey: [],
derivationIndex: 0, derivationIndex: 0,
derivationPath: null, derivationPath: null,
type: AddressType.unknown, type: AddressType.banano,
subType: AddressSubType.receiving, subType: AddressSubType.receiving,
); );