Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #159 from synapsecns/version/deprecating
Browse files Browse the repository at this point in the history
Version/deprecating -- fix build errors
  • Loading branch information
trajan0x committed Apr 17, 2024
2 parents dbe4cf3 + aac866c commit b7f0d88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bridge/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ export namespace Bridge {
tokenTo: Token
chainIdTo: number,
}): [boolean, string] {
console.log('Bridging through this SDK has been deprecated. Please use the new SDK found on docs.synapseprotocol.com')
throw new Error('Bridging through this SDK has been deprecated. Please use the new SDK found on docs.synapseprotocol.com')
console.log('Bridging through this SDK has been deprecated. Please use the new SDK found on docs.synapseprotocol.com')
throw new Error('Bridging through this SDK has been deprecated. Please use the new SDK found on docs.synapseprotocol.com')
const {swapSupported, reasonNotSupported} = bridgeSwapSupported({...args, chainIdFrom: this.chainId});
Expand Down Expand Up @@ -503,13 +505,13 @@ export namespace Bridge {
const {token, amount} = args;
let spender: string = this.zapBridgeAddress;

if (instanceOfToken(token) && token.isEqual(Tokens.MULTIJEWEL)) {
if (instanceOfToken(token) && (token as Token).isEqual(Tokens.MULTIJEWEL)) {
spender = SynapseEntities.AvaxJewelMigrationAddress;
}

/* c8 ignore start */
let tokenAddr: string = instanceOfToken(token)
? token.address(this.chainId)
? (token as Token).address(this.chainId)
: token as string;
/* c8 ignore stop */

Expand Down Expand Up @@ -1264,8 +1266,6 @@ export namespace Bridge {
};

export function getRequiredConfirmationsForBridge(network: Networks.Network | number): number | null {
console.log('Bridging through this SDK has been deprecated. Please use the new SDK found on docs.synapseprotocol.com')
throw new Error('Bridging through this SDK has been deprecated. Please use the new SDK found on docs.synapseprotocol.com')
let chainId: number = network instanceof Networks.Network ? network.chainId : network;

if (chainId in REQUIRED_CONFS) {
Expand Down

0 comments on commit b7f0d88

Please sign in to comment.