We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4b1a825 + c00ade0 commit e642c7bCopy full SHA for e642c7b
modules/abstract-utxo/src/abstractUtxoCoin.ts
@@ -567,7 +567,11 @@ export abstract class AbstractUtxoCoin extends BaseCoin {
567
if (typeof input === 'string') {
568
for (const format of ['hex', 'base64'] as const) {
569
const buffer = Buffer.from(input, format);
570
- if (buffer.toString(format) === input.toLowerCase()) {
+ const bufferToString = buffer.toString(format);
571
+ if (
572
+ (format === 'base64' && bufferToString === input) ||
573
+ (format === 'hex' && bufferToString === input.toLowerCase())
574
+ ) {
575
return this.decodeTransaction(buffer);
576
}
577
0 commit comments