Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/zapper v3 #953

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@oraichain/common-contracts-build": "1.0.35",
"@oraichain/cw-simulate": "^2.8.75",
"@oraichain/oraidex-contracts-build": "1.0.22",
"@oraichain/oraiswap-v3": "0.1.8",
"@oraichain/oraiswap-v3": "0.1.7-beta.2",
"@sentry/webpack-plugin": "^2.10.3",
"@types/classnames": "^2.2.10",
"@types/jest": "^29.5.10",
Expand Down
7 changes: 4 additions & 3 deletions src/pages/Pool-V3/components/CreatePositionForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ const CreatePositionForm: FC<CreatePoolFormProps> = ({
navigate(`/pools-v3/${encodeURIComponent(poolKeyToString(poolData.pool_key))}`);
},
(e) => {
console.log({ errorZap: e });
displayToast(TToastType.TX_FAILED, {
message: 'Add liquidity failed!'
});
Expand All @@ -825,7 +826,7 @@ const CreatePositionForm: FC<CreatePoolFormProps> = ({
tokenTo: tokenTo.name,
poolData: poolKeyToString(poolData.pool_key),
zapAmount,
fromUsd,
zapUsd,
type: 'ZapIn'
};
mixpanel.track('Zap PoolV3 oraiDEX', logEvent);
Expand Down Expand Up @@ -908,9 +909,9 @@ const CreatePositionForm: FC<CreatePoolFormProps> = ({
const routerApi = 'https://osor.oraidex.io/smart-router/alpha-router';
const zapper = new ZapConsumer({
client,
deviation: 0,
devitation: 0,
dexV3Address: network.pool_v3,
multiCallAddress: MULTICALL_CONTRACT,
multicallAddress: MULTICALL_CONTRACT,
routerApi,
smartRouteConfig: {
swapOptions: {
Expand Down
7 changes: 4 additions & 3 deletions src/pages/Pool-V3/components/ZapOutForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ const ZapOutForm: FC<ZapOutFormProps> = ({
// navigate(`/pools-v3?type=positions`);
},
(e) => {
console.log({ errorZap: e });
displayToast(TToastType.TX_FAILED, {
message: 'Zap Out failed!'
});
Expand All @@ -197,7 +198,7 @@ const ZapOutForm: FC<ZapOutFormProps> = ({
tokenTo: tokenTo.name,
poolData: poolKeyToString(position.pool_key),
zapAmount,
fromUsd,
zapUsd,
type: 'ZapOut'
};
mixpanel.track('Zap PoolV3 oraiDEX', logEvent);
Expand Down Expand Up @@ -225,9 +226,9 @@ const ZapOutForm: FC<ZapOutFormProps> = ({

const zapper = new ZapConsumer({
client: await CosmWasmClient.connect(network.rpc),
deviation: 0,
devitation: 0,
dexV3Address: network.pool_v3,
multiCallAddress: MULTICALL_CONTRACT,
multicallAddress: MULTICALL_CONTRACT,
routerApi: 'https://osor.oraidex.io/smart-router/alpha-router',
smartRouteConfig: {
swapOptions: {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4434,10 +4434,10 @@
tronweb "5.3.2"
ts-protoc-gen "^0.15.0"

"@oraichain/oraiswap-v3@0.1.8":
version "0.1.8"
resolved "https://registry.yarnpkg.com/@oraichain/oraiswap-v3/-/oraiswap-v3-0.1.8.tgz#540e75025e51ff68cd3b6f26b2056d24860221c5"
integrity sha512-v/7B1EK/t7PSDef5qI20wyl92GvBQct4gxakq4Nyql2+cDFo3a4zfCYoCHzP9oH8RTqhsQHieMTv2ADvRUTgpA==
"@oraichain/oraiswap-v3@0.1.7-beta.2":
version "0.1.7-beta.2"
resolved "https://registry.yarnpkg.com/@oraichain/oraiswap-v3/-/oraiswap-v3-0.1.7-beta.2.tgz#cc9e3c8056895dc54c9b5f722832787d8ccdf869"
integrity sha512-bb40bYQnaNv/9r4cmrU6gZn4FrXfvAA3DgwFVn9xWMOV3VkYkpY4rEdjH7P9Ad91/AMcJqbOg1m52A37o36RsA==
dependencies:
"@cosmjs/cosmwasm-stargate" "^0.31.0"
"@oraichain/oraidex-common" "^1.1.6"
Expand Down
Loading