mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 11:29:23 +00:00
update libepiccash and fix odd address error caused by some odd code
This commit is contained in:
parent
9c9a9f8d3e
commit
db7422a100
2 changed files with 9 additions and 18 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 1d48c0a8aa394324e7c39267e5654038834aff95
|
||||
Subproject commit 0bb1b1ced6e0d3c66e383698f89825754c692986
|
|
@ -299,26 +299,19 @@ class EpiccashWallet extends Bip39Wallet {
|
|||
}
|
||||
}
|
||||
|
||||
/// Only index 0 is currently used in stack wallet.
|
||||
Future<Address> _generateAndStoreReceivingAddressForIndex(
|
||||
int index,
|
||||
) async {
|
||||
Address? address = await getCurrentReceivingAddress();
|
||||
|
||||
if (address != null) {
|
||||
final splitted = address.value.split('@');
|
||||
//Check if the address is the same as the current epicbox domain
|
||||
//Since we're only using one epicbpox now this doesn't apply but will be
|
||||
// useful in the future
|
||||
final epicboxConfig = await getEpicBoxConfig();
|
||||
if (splitted[1] != epicboxConfig.host) {
|
||||
//Update the address
|
||||
address = await thisWalletAddress(index, epicboxConfig);
|
||||
}
|
||||
} else {
|
||||
final epicboxConfig = await getEpicBoxConfig();
|
||||
address = await thisWalletAddress(index, epicboxConfig);
|
||||
// Since only 0 is a valid index in stack wallet at this time, lets just
|
||||
// throw is not zero
|
||||
if (index != 0) {
|
||||
throw Exception("Invalid/unexpected address index used");
|
||||
}
|
||||
|
||||
final epicBoxConfig = await getEpicBoxConfig();
|
||||
final address = await thisWalletAddress(index, epicBoxConfig);
|
||||
|
||||
if (info.cachedReceivingAddress != address.value) {
|
||||
await info.updateReceivingAddress(
|
||||
newAddress: address.value,
|
||||
|
@ -948,8 +941,6 @@ class EpiccashWallet extends Bip39Wallet {
|
|||
final slatesToCommits = info.epicData?.slatesToCommits ?? {};
|
||||
|
||||
for (final tx in transactions) {
|
||||
Logging.instance.log("tx: $tx", level: LogLevel.Info);
|
||||
|
||||
final isIncoming =
|
||||
tx.txType == epic_models.TransactionType.TxReceived ||
|
||||
tx.txType == epic_models.TransactionType.TxReceivedCancelled;
|
||||
|
|
Loading…
Reference in a new issue