mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 18:44:31 +00:00
strip as many trailing 00s as are present
This commit is contained in:
parent
660d98e5e4
commit
061be596f5
1 changed files with 5 additions and 5 deletions
|
@ -408,13 +408,13 @@ class ParticlWallet extends Bip39HDWallet
|
|||
level: LogLevel.Error);
|
||||
throw Exception("Invalid hex string length.");
|
||||
}
|
||||
int maxStrips = 3; // Strip up to 3 0x00s (match previous particl_wallet).
|
||||
// int maxStrips = 3; // Strip up to 3 0x00s (match previous particl_wallet).
|
||||
while (hexString.endsWith('00') && hexString.length > 2) {
|
||||
hexString = hexString.substring(0, hexString.length - 2);
|
||||
maxStrips--;
|
||||
if (maxStrips <= 0) {
|
||||
break;
|
||||
}
|
||||
// maxStrips--;
|
||||
// if (maxStrips <= 0) {
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
return txData.copyWith(
|
||||
|
|
Loading…
Reference in a new issue