Skip to content

Commit

Permalink
hotfix: bump bridge and enable Hydra XCM (#1112)
Browse files Browse the repository at this point in the history
* chore: bump bridge and enable Hydra XCM

* chore: bump xcm bridge

* chore: add Hydra icon
  • Loading branch information
tomjeatt authored Apr 11, 2023
1 parent cdd7c40 commit ad52679
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 6 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.4",
"@interlay/bridge": "^0.2.9",
"@interlay/interbtc-api": "2.0.3",
"@interlay/monetary-js": "0.7.2",
"@polkadot/api": "9.14.2",
Expand Down
2 changes: 2 additions & 0 deletions src/config/relay-chains.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { HydraAdapter } from '@interlay/bridge/build/adapters/hydradx';
import { InterlayAdapter, KintsugiAdapter } from '@interlay/bridge/build/adapters/interlay';
import { KusamaAdapter, PolkadotAdapter } from '@interlay/bridge/build/adapters/polkadot';
import { StatemineAdapter, StatemintAdapter } from '@interlay/bridge/build/adapters/statemint';
Expand Down Expand Up @@ -153,6 +154,7 @@ switch (process.env.REACT_APP_RELAY_CHAIN_NAME) {
// TODO: temporary
TRANSACTION_FEE_AMOUNT = newMonetaryAmount(0.2, GOVERNANCE_TOKEN, true);
XCM_ADAPTERS = {
hydra: new HydraAdapter(),
interlay: new InterlayAdapter(),
polkadot: new PolkadotAdapter(),
statemint: new StatemintAdapter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { forwardRef, ForwardRefExoticComponent, RefAttributes } from 'react';
import { IconProps } from '@/component-library/Icon';

import { StyledFallbackIcon } from './ChainIcon.style';
import { INTERLAY, KINTSUGI, KUSAMA, POLKADOT, STATEMINE, STATEMINT } from './icons';
import { HYDRA, INTERLAY, KINTSUGI, KUSAMA, POLKADOT, STATEMINE, STATEMINT } from './icons';

type ChainComponent = ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;

const chainsIcon: Record<string, ChainComponent> = {
HYDRA,
INTERLAY,
KINTSUGI,
KUSAMA,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '@/component-library/Icon';

const HYDRA = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'>
<title>HYDRA</title>
<g clipPath='url(#clip0_166_3)'>
<circle cx='12' cy='12' r='11.5' fill='#191C28' stroke='#F6297C' />
<g clipPath='url(#clip1_166_3)'>
<path
fillRule='evenodd'
clipRule='evenodd'
d='M1.91669 12.0004L12.0036 1.91667L22.0834 12.003L12.0036 22.0833L1.91669 12.0004ZM17.9599 8.97381C17.5408 9.44209 16.627 10.6212 16.627 12.0004C16.627 13.3795 17.5408 14.5587 17.9599 15.0269C15.2678 14.8844 13.1152 12.0004 13.1152 12.0004C13.1152 12.0004 15.2678 9.11626 17.9599 8.97381ZM6.0547 8.97381C8.74686 9.11626 10.8994 12.0004 10.8994 12.0004C10.8994 12.0004 8.74686 14.8844 6.0547 15.0269C6.4738 14.5587 7.38758 13.3795 7.38758 12.0004C7.38758 10.6212 6.4738 9.44209 6.0547 8.97381ZM5.62818 8.99164C5.20225 9.47101 4.31075 10.6382 4.31075 12.0004C4.31075 13.3679 5.20924 14.5389 5.63317 15.0147L7.81374 17.197L7.82401 17.187C8.697 16.3333 10.1482 15.2114 11.8026 15.1259C11.3861 15.5903 10.4676 16.771 10.4676 18.1527C10.4676 19.5344 11.3861 20.7151 11.8026 21.1795L12.0036 21.3901L12.2045 21.1795C12.621 20.7151 13.5396 19.5344 13.5396 18.1527C13.5396 16.771 12.621 15.5903 12.2045 15.1259C13.8654 15.2117 15.3215 16.3421 16.1934 17.197L18.4254 14.9632L18.4306 14.9573C18.8719 14.4501 19.7038 13.3163 19.7038 12.0004C19.7038 10.6793 18.8654 9.54169 18.4254 9.03752L16.2038 6.81415L16.1935 6.82418C15.3214 7.67898 13.8654 8.80932 12.2045 8.89512C12.621 8.43073 13.5396 7.25002 13.5396 5.86833C13.5396 4.48663 12.621 3.30592 12.2045 2.84155L12.0036 2.61061L11.8026 2.84155C11.3861 3.30592 10.4676 4.48663 10.4676 5.86833C10.4676 7.25002 11.3861 8.43073 11.8026 8.89512C10.1352 8.809 8.67431 7.67008 7.80334 6.81415L5.62818 8.99164Z'
fill='#F6297C'
/>
</g>
</g>
<defs>
<clipPath id='clip0_166_3'>
<rect width='24' height='24' fill='white' />
</clipPath>
<clipPath id='clip1_166_3'>
<rect width='22' height='22' fill='white' transform='translate(1 1)' />
</clipPath>
</defs>
</Icon>
));

HYDRA.displayName = 'INTERLAY';

export { HYDRA };
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { HYDRA } from './Hydra';
export { INTERLAY } from './Interlay';
export { KINTSUGI } from './Kintsugi';
export { KUSAMA } from './Kusama';
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2542,10 +2542,10 @@
resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c"
integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==

"@interlay/bridge@^0.2.4":
version "0.2.4"
resolved "https://registry.yarnpkg.com/@interlay/bridge/-/bridge-0.2.4.tgz#83f446575d1b66cac7601bc4b771c3b19b9137b5"
integrity sha512-XYgLhd4anvoaLL9C+Su/BDATd0K6rQipZXjQW3wuqTYyy+Pr7ItNGu4FbSGLqid1osn7b7No4sXQ5WwFJsZSQA==
"@interlay/bridge@^0.2.9":
version "0.2.9"
resolved "https://registry.yarnpkg.com/@interlay/bridge/-/bridge-0.2.9.tgz#3b3785ec4752c0c2f0cedaf9a6b62ef3f4235778"
integrity sha512-J2yJNK2yCeUP5dMDgqGsMckRzmh1qM4ge/CGBK5AYHUHzEKr2KcCMY7UrKCaSXzRYMVdLc+f8hd+FeMHCznffg==
dependencies:
"@acala-network/api" "4.1.8-9"
"@acala-network/sdk" "4.1.8-9"
Expand Down

1 comment on commit ad52679

@vercel
Copy link

@vercel vercel bot commented on ad52679 Apr 11, 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.