diff --git a/packages/sdk/src/Sygma.ts b/packages/sdk/src/Sygma.ts index a96f7c665..bf9baf4eb 100644 --- a/packages/sdk/src/Sygma.ts +++ b/packages/sdk/src/Sygma.ts @@ -162,7 +162,7 @@ export class Sygma implements SygmaSDK { return this; } - public async setDestination(domainId: string) { + public setDestination(domainId: string) { let chain2: SygmaBridgeSetup | undefined; if (domainId) { chain2 = this.bridgeSetupList!.find(el => el.domainId === domainId); @@ -172,6 +172,8 @@ export class Sygma implements SygmaSDK { throw `Cannot find network with domainID: ${domainId} in config`; } + this.bridgeSetup!.chain2 = chain2 + const connector = setConnectorRPC(chain2.rpcUrl); this.providers!.chain2 = connector.provider; @@ -370,9 +372,9 @@ export class Sygma implements SygmaSDK { * @name depositGeneric * @description call generic handler to achieve general message passing * @param {string} resourceId - * @param {string} depositData - * @param {string} fee - * @returns + * @param {string} depositData + * @param {string} fee + * @returns */ public async depositGeneric( resourceId: string, depositData: string, fee: FeeDataResult