Skip to content

Commit

Permalink
Fixed relayed transactions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielailie committed Dec 11, 2024
1 parent ca9e3cb commit b99bfaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/relayed/relayedTransactionsFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ export class RelayedTransactionsFactory {

private prepareInnerTransactionForRelayedV1(innerTransaction: Transaction): string {
const txObject = {
nonce: Number(innerTransaction.nonce),
nonce: innerTransaction.nonce,
sender: innerTransaction.sender.getPublicKey().toString("base64"),
receiver: innerTransaction.receiver.getPublicKey().toString("base64"),
value: innerTransaction.value.toString(),
gasPrice: Number(innerTransaction.gasPrice),
gasLimit: Number(innerTransaction.gasLimit),
value: innerTransaction.value,
gasPrice: innerTransaction.gasPrice,
gasLimit: innerTransaction.gasLimit,
data: Buffer.from(innerTransaction.data).toString("base64"),
signature: Buffer.from(innerTransaction.signature).toString("base64"),
chainID: Buffer.from(innerTransaction.chainID).toString("base64"),
Expand Down
3 changes: 1 addition & 2 deletions src/transactionComputer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class TransactionComputer {
obj.chainID = transaction.chainID;
obj.version = transaction.version;
obj.options = transaction.options ? transaction.options : undefined;
obj.guardian = transaction.guardian.isEmpty() ? undefined : transaction.guardian;
obj.guardian = transaction.guardian.isEmpty() ? undefined : transaction.guardian.bech32();

return obj;
}
Expand All @@ -131,7 +131,6 @@ export class TransactionComputer {
}

private toBase64OrUndefined(value?: string | Uint8Array) {
console.log(1121, value && value.length ? Buffer.from(value).toString("base64") : undefined);
return value && value.length ? Buffer.from(value).toString("base64") : undefined;
}

Expand Down

0 comments on commit b99bfaa

Please sign in to comment.