Skip to content

Commit

Permalink
chore: temp cosmos condition & signer parsing to handle more cosmos p…
Browse files Browse the repository at this point in the history
…roviders
  • Loading branch information
odcey committed Mar 27, 2024
1 parent a31711e commit ec00c62
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,10 @@ export class Squid {
});
}

const isEvmChainId = Number(route.params.fromChain) > 0;

// handle cosmos case
if (
signer instanceof SigningStargateClient ||
signer.constructor.name === "SigningStargateClient" ||
signer instanceof SigningCosmWasmClient ||
signer.constructor.name === "SigningCosmWasmClient"
) {
if (!isEvmChainId) {
return await this.executeRouteCosmos(
signer as SigningStargateClient,
signerAddress!,
Expand Down Expand Up @@ -382,7 +379,7 @@ export class Squid {
fromAmount: params.fromAmount,
fromChain,
infiniteApproval: executionSettings?.infiniteApproval,
signer,
signer: signer as ethers.Signer,
overrides: _overrides
});
}
Expand All @@ -402,7 +399,7 @@ export class Squid {
};
}

return await signer.sendTransaction(tx);
return await (signer as ethers.Signer).sendTransaction(tx);
}

public getRawTxHex({
Expand Down

0 comments on commit ec00c62

Please sign in to comment.