mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 03:06:29 +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);
|
level: LogLevel.Error);
|
||||||
throw Exception("Invalid hex string length.");
|
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) {
|
while (hexString.endsWith('00') && hexString.length > 2) {
|
||||||
hexString = hexString.substring(0, hexString.length - 2);
|
hexString = hexString.substring(0, hexString.length - 2);
|
||||||
maxStrips--;
|
// maxStrips--;
|
||||||
if (maxStrips <= 0) {
|
// if (maxStrips <= 0) {
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return txData.copyWith(
|
return txData.copyWith(
|
||||||
|
|
Loading…
Reference in a new issue