Skip to content

Commit

Permalink
fix: destination network selection (#104)
Browse files Browse the repository at this point in the history
destinatin network selection fix
  • Loading branch information
enemycnt authored Nov 7, 2022
1 parent aaacfaf commit 3f2dbb1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/sdk/src/Sygma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3f2dbb1

Please sign in to comment.