Skip to content

Commit

Permalink
Relay route from Sui should display the recipient address
Browse files Browse the repository at this point in the history
Previously it was displaying the `to` address (the relayer contract)
in the "Send To" component.

Addresses #978
  • Loading branch information
kev1n-peters committed Oct 3, 2023
1 parent 4080ef4 commit 67eea84
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdk/src/contexts/sui/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,13 @@ export class SuiContext<
);
const tokenChain = this.context.toChainName(parsed.tokenChain);
const gasFee = getTotalGasUsed(txBlock);
const to = destContext.parseAddress(hexlify(parsed.to));
const parsedMessage: ParsedMessage = {
sendTx: txBlock.digest,
sender: getTransactionSender(txBlock) || '',
amount: BigNumber.from(parsed.amount),
payloadID: parsed.payloadType,
recipient: destContext.parseAddress(hexlify(parsed.to)),
recipient: to,
toChain: this.context.toChainName(parsed.toChain),
fromChain: this.context.toChainName(chain),
tokenAddress,
Expand All @@ -436,7 +437,8 @@ export class SuiContext<
...parsedMessage,
relayerFee: relayerPayload.relayerFee,
relayerPayloadId: parsed.payloadType as number,
to: relayerPayload.to,
to,
recipient: destContext.parseAddress(hexlify(relayerPayload.to)),
toNativeTokenAmount: relayerPayload.toNativeTokenAmount,
payload: parsed.tokenTransferPayload.length
? hexlify(parsed.tokenTransferPayload)
Expand Down

0 comments on commit 67eea84

Please sign in to comment.