Skip to content

Commit

Permalink
Fix checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Jun 13, 2023
1 parent e5eca70 commit 7786d71
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,16 +339,16 @@ export class Transaction {
nonce: Number(plainObjectTransaction.nonce),
value: new BigNumber(plainObjectTransaction.value).toFixed(0),
receiver: Address.fromString(plainObjectTransaction.receiver),
receiverUsername: plainObjectTransaction.receiverUsername ? Buffer.from(plainObjectTransaction.receiverUsername || "", "base64").toString() : undefined,
receiverUsername: plainObjectTransaction.receiverUsername ? Buffer.from(plainObjectTransaction.receiverUsername, "base64").toString() : undefined,
sender: Address.fromString(plainObjectTransaction.sender),
senderUsername: plainObjectTransaction.senderUsername ? Buffer.from(plainObjectTransaction.senderUsername || "", "base64").toString() : undefined,
guardian: plainObjectTransaction.guardian ? Address.fromString(plainObjectTransaction.guardian || "") : undefined,
senderUsername: plainObjectTransaction.senderUsername ? Buffer.from(plainObjectTransaction.senderUsername, "base64").toString() : undefined,
guardian: plainObjectTransaction.guardian ? Address.fromString(plainObjectTransaction.guardian) : undefined,
gasPrice: Number(plainObjectTransaction.gasPrice),
gasLimit: Number(plainObjectTransaction.gasLimit),
data: new TransactionPayload(Buffer.from(plainObjectTransaction.data || "", "base64")),
chainID: String(plainObjectTransaction.chainID),
version: new TransactionVersion(plainObjectTransaction.version),
options: plainObjectTransaction.options !== undefined ? new TransactionOptions(plainObjectTransaction.options) : undefined
options: plainObjectTransaction.options != null ? new TransactionOptions(plainObjectTransaction.options) : undefined
});

if (plainObjectTransaction.signature) {
Expand Down

0 comments on commit 7786d71

Please sign in to comment.