Skip to content

Commit

Permalink
chore: package upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ap211unitech committed Jun 24, 2024
1 parent 3c176c7 commit c928c48
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apps/hestia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@polkadex/numericals": "^0.4.0",
"@polkadex/polkadex-api": "^3.6.2",
"@polkadex/subscan": "^1.1.61",
"@polkadex/thea": "^6.0.0",
"@polkadex/thea": "^6.1.0",
"@polkadex/ux": "^6.26.0",
"@polkadex/react-providers": "^2.2.1",
"@polkadex/types": "^1.2.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,11 @@ export const Withdraw = () => {

const minAmount = useMemo(() => {
if (isDestinationPolkadex) return 0;
if (selectedAsset?.ticker === "PDEX") return THEA_WITHDRAW_FEE;

const destFee =
destinationFee?.ticker === selectedAsset?.ticker
? destinationFee?.amount || 0
: 0;
if (selectedAsset?.ticker === "PDEX") return THEA_WITHDRAW_FEE + destFee;
return +autoSwapAmount + destFee;
}, [
isDestinationPolkadex,
Expand Down Expand Up @@ -274,7 +273,7 @@ export const Withdraw = () => {
</Typography.Heading>
<HoverInformation>
<HoverInformation.Trigger
loading={loading}
loading={sourceBalancesLoading}
className="min-w-20"
>
<RiInformationFill className="w-3 h-3 text-actionInput" />
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@polkadex/local-wallets": "^2.2.0",
"@polkadex/polkadex-api": "^3.6.2",
"@polkadex/react-providers": "^2.2.1",
"@polkadex/thea": "^6.0.0",
"@polkadex/thea": "^6.1.0",
"@polkadex/utils": "^0.2.1",
"@polkadot-cloud/assets": "^0.3.0",
"@polkadot/api": "^10.12.6",
Expand Down
12 changes: 10 additions & 2 deletions packages/core/src/helpers/createWithdrawHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { ApiPromise } from "@polkadot/api";
import { getNonce } from "@orderbook/core/helpers/getNonce";
import { Chain, getDirectWithdrawalMultilocation } from "@polkadex/thea";
import {
Chain,
ChainType,
getDirectWithdrawalMultilocation,
} from "@polkadex/thea";

import { GENESIS } from "../constants";

Expand Down Expand Up @@ -39,7 +43,11 @@ export const createDirectWithdrawSigningPayload = (
destinationAccount: string,
destinationChain: Chain
): [object, object] => {
const accountId = api.createType("AccountId32", destinationAccount);
const accountId =
destinationChain.type === ChainType.Substrate
? api.createType("AccountId32", destinationAccount)
: api.createType("AccountId20", destinationAccount);

const timestamp = getNonce();

const isDestinationPolkadex = destinationChain.genesis === GENESIS[0];
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3858,10 +3858,10 @@
"@polkadex/types" "1.1.61"
"@polkadex/utils" "1.1.46"

"@polkadex/thea@^6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@polkadex/thea/-/thea-6.0.0.tgz#2ecb07e07d9c7d46f756c99cc0456143609a3cbd"
integrity sha512-jT1wmCwqSTH3VPTRx68iCcXMPUwktrS4x2HGpzQQYWGOu1jOM8CPRWRA4xKGzWNsrygrCWYP2SoCWacnN6vZog==
"@polkadex/thea@^6.1.0":
version "6.1.0"
resolved "https://registry.yarnpkg.com/@polkadex/thea/-/thea-6.1.0.tgz#f3be770ce09083d6f19b1b2e3b33e2dd54b5b407"
integrity sha512-n8x5xfyY4cVj2e40xMOYB9l42W1hQwGZG0999yJIs28f1gRe1omlbTxk9tuCyNLXxGBNs0RcwN20BlVfHlf1uw==
dependencies:
"@moonbeam-network/xcm-sdk" "^2.1.2"
"@polkadex/numericals" "*"
Expand Down

0 comments on commit c928c48

Please sign in to comment.