Skip to content

Commit

Permalink
adding check for payload and error if one is set for Sei (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin authored Oct 3, 2023
1 parent 67eea84 commit d2ce26b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/src/wormhole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ export class WormholeContext extends MultiProvider<Domain> {
): Promise<SendResult> {
const context = this.getContext(sendingChain);

if (!payload && recipientChain === 'sei') {
if (recipientChain === 'sei') {
if (payload) throw new Error('Custom payload is not supported for Sei');

const { payload: seiPayload, receiver } = await (
this.getContext('sei') as SeiContext<WormholeContext>
).buildSendPayload(token, recipientAddress);
Expand Down

0 comments on commit d2ce26b

Please sign in to comment.