mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 18:44:31 +00:00
fic particl txs
This commit is contained in:
parent
152b516947
commit
3753a699ab
1 changed files with 6 additions and 6 deletions
|
@ -398,18 +398,18 @@ class ParticlWallet extends Bip39HDWallet
|
|||
final vSize = builtTx.virtualSize();
|
||||
|
||||
// Strip trailing 0x00 bytes from hex.
|
||||
String hexString = builtTx.toHex();
|
||||
|
||||
// Ensure the string has an even length.
|
||||
//
|
||||
// This is done to match the previous particl_wallet implementation.
|
||||
// TODO: [prio=low] Rework Particl tx construction so as to obviate this.
|
||||
String hexString = builtTx.toHex(isParticl: true).toString();
|
||||
if (hexString.length % 2 != 0) {
|
||||
// Ensure the string has an even length.
|
||||
Logging.instance.log("Hex string has odd length, which is unexpected.",
|
||||
level: LogLevel.Error);
|
||||
throw Exception("Invalid hex string length.");
|
||||
}
|
||||
|
||||
// Strip up trailing '00' bytes.
|
||||
int numStrips = 0;
|
||||
int maxStrips = 3; // Strip up to 3 (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);
|
||||
numStrips++;
|
||||
|
|
Loading…
Reference in a new issue