Skip to content

Commit

Permalink
chore: bump XCM bridge (#1093)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjeatt authored Apr 3, 2023
1 parent b7e3540 commit 65ac49a
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 162 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@craco/craco": "^6.1.1",
"@headlessui/react": "^1.1.1",
"@heroicons/react": "^2.0.0",
"@interlay/bridge": "^0.2.3",
"@interlay/bridge": "^0.3.2",
"@interlay/interbtc-api": "2.0.3",
"@interlay/monetary-js": "0.7.2",
"@polkadot/api": "9.14.2",
Expand Down
6 changes: 1 addition & 5 deletions src/utils/hooks/api/xcm/use-xcm-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ import { useEffect, useState } from 'react';
import { firstValueFrom } from 'rxjs';

import { XCM_ADAPTERS } from '@/config/relay-chains';
import { BITCOIN_NETWORK } from '@/constants';

const XCMBridge = new Bridge({
adapters: Object.values(XCM_ADAPTERS)
});

// MEMO: BitcoinNetwork type is not available on XCM bridge
const XCMNetwork = BITCOIN_NETWORK === 'mainnet' ? 'mainnet' : 'testnet';

// TODO: This config needs to be pushed higher up the app.
// Not sure how this will look: something to decide when
// adding USDT support.
Expand Down Expand Up @@ -41,7 +37,7 @@ const useXCMBridge = (): { XCMProvider: ApiProvider; XCMBridge: Bridge } => {

useEffect(() => {
const createBridge = async () => {
const XCMProvider = new ApiProvider(XCMNetwork);
const XCMProvider = new ApiProvider();
const chains = Object.keys(XCM_ADAPTERS) as ChainName[];

// Check connection
Expand Down
Loading

2 comments on commit 65ac49a

@vercel
Copy link

@vercel vercel bot commented on 65ac49a Apr 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 65ac49a Apr 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.