@ape.swap/bonds-sdk 5.1.49-test.6 → 5.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/TokenSelectorModal/TokenRow.d.ts +2 -1
- package/dist/components/TokenSelectorModal/TokenRow.js +2 -8
- package/dist/components/TokenSelectorModal/TokenRow.js.map +1 -1
- package/dist/components/TokenSelectorModal/index.d.ts +1 -0
- package/dist/components/TokenSelectorModal/index.js +2 -2
- package/dist/components/TokenSelectorModal/index.js.map +1 -1
- package/dist/components/TokenSelectorPanel/index.d.ts +2 -1
- package/dist/components/TokenSelectorPanel/index.js +2 -2
- package/dist/components/TokenSelectorPanel/index.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/uikit-sdk/Svg/tokens/APTOS.js.map +1 -1
- package/dist/config/constants/networks.js +1 -2
- package/dist/config/constants/networks.js.map +1 -1
- package/dist/config/constants/suiZapTokens.d.ts +2 -10
- package/dist/config/constants/suiZapTokens.js +9 -26
- package/dist/config/constants/suiZapTokens.js.map +1 -1
- package/dist/config/constants/tokens.js +0 -12
- package/dist/config/constants/tokens.js.map +1 -1
- package/dist/config/constants/tooltips.js.map +1 -1
- package/dist/constants/suiConstants.d.ts +0 -1
- package/dist/constants/suiConstants.js +1 -7
- package/dist/constants/suiConstants.js.map +1 -1
- package/dist/hooks/useMonitorTx.js.map +1 -1
- package/dist/state/bonds/fetchBillsUserAptos.js +2 -2
- package/dist/state/bonds/fetchBillsUserAptos.js.map +1 -1
- package/dist/state/bonds/fetchBillsUserSui.js +3 -5
- package/dist/state/bonds/fetchBillsUserSui.js.map +1 -1
- package/dist/state/bonds/fetchBondsDataSui.js +9 -11
- package/dist/state/bonds/fetchBondsDataSui.js.map +1 -1
- package/dist/state/bonds/useUserBonds.js.map +1 -1
- package/dist/state/zap/useSuiZapQuote.d.ts +2 -2
- package/dist/state/zap/useSuiZapQuote.js +2 -2
- package/dist/state/zap/useSuiZapQuote.js.map +1 -1
- package/dist/utils/aptosHelpers.js.map +1 -1
- package/dist/utils/suiHelpers.js +3 -2
- package/dist/utils/suiHelpers.js.map +1 -1
- package/dist/views/BuyBond/BuyComponent.js +1 -1
- package/dist/views/BuyBond/BuyComponent.js.map +1 -1
- package/dist/views/BuyBond/BuyComponentAptos.js +1 -1
- package/dist/views/BuyBond/BuyComponentAptos.js.map +1 -1
- package/dist/views/BuyBond/BuyComponentPreTGE.js +1 -1
- package/dist/views/BuyBond/BuyComponentPreTGE.js.map +1 -1
- package/dist/views/BuyBond/BuyComponentSolana.js +1 -1
- package/dist/views/BuyBond/BuyComponentSolana.js.map +1 -1
- package/dist/views/BuyBond/BuyComponentSui.js +1 -1
- package/dist/views/BuyBond/BuyComponentSui.js.map +1 -1
- package/dist/views/BuyBond/components/Estimations.js +6 -7
- package/dist/views/BuyBond/components/Estimations.js.map +1 -1
- package/dist/views/BuyBond/components/GetUpToComponent/GetUpToComponent.js +2 -1
- package/dist/views/BuyBond/components/GetUpToComponent/GetUpToComponent.js.map +1 -1
- package/dist/views/SingleBond/SoldOutBuyBondPlaceholder.js +1 -1
- package/dist/views/SingleBond/SoldOutBuyBondPlaceholder.js.map +1 -1
- package/dist/views/YourBonds/YourBonds.js.map +1 -1
- package/dist/views/YourBondsModal/components/TransferBondModal/TransferActionSui.js +0 -1
- package/dist/views/YourBondsModal/components/TransferBondModal/TransferActionSui.js.map +1 -1
- package/package.json +2 -2
- package/dist/state/bonds/useBondNFTData.d.ts +0 -8
|
@@ -19,7 +19,6 @@ const TransferActionSui = ({ userBill, toAddress, disabled, onDismiss, }) => {
|
|
|
19
19
|
const { addToastError, addToastSuccess } = usePopups();
|
|
20
20
|
// State
|
|
21
21
|
const [loadingTx, setLoadingTx] = useState(false);
|
|
22
|
-
const [connectModalOpen, setConnectModalOpen] = useState(false);
|
|
23
22
|
const load = loadingTx;
|
|
24
23
|
const handleTransfer = async () => {
|
|
25
24
|
if (loadingTx || !suiAccount || !userBill || !signAndExecuteTransaction || !toAddress)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferActionSui.js","sources":["../../../../../src/views/YourBondsModal/components/TransferBondModal/TransferActionSui.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport { Transaction } from '@mysten/sui/transactions'\nimport {
|
|
1
|
+
{"version":3,"file":"TransferActionSui.js","sources":["../../../../../src/views/YourBondsModal/components/TransferBondModal/TransferActionSui.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport { Transaction } from '@mysten/sui/transactions'\nimport { ChainId } from '@ape.swap/apeswap-lists'\n\nimport { UserBill } from '../../../../types/yourbonds'\nimport Button from '../../../../components/uikit-sdk/Button/Button'\nimport { usePopups } from '../../../../state/popups/usePopups'\nimport { useSDKConfig } from '../../../../state/useSDKConfig'\nimport { reportError } from '../../../../utils/reportError'\nimport { getSuiClient, verifySuiTxSuccess } from '../../../../utils/suiHelpers'\nimport useSUIAccount from '../../../../hooks/accounts/useSUIAccount'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { QUERY_KEYS } from '../../../../config/constants/queryKeys'\n\nconst TransferActionSui = ({\n userBill,\n toAddress,\n disabled,\n onDismiss,\n}: {\n userBill?: UserBill\n toAddress?: string\n disabled?: boolean\n onDismiss?: () => void\n}) => {\n // Hooks\n const SDKConfig = useSDKConfig()\n const queryClient = useQueryClient()\n const { address: suiAccount, signAndExecuteTransaction } = useSUIAccount()\n const { addToastError, addToastSuccess } = usePopups()\n\n // State\n const [loadingTx, setLoadingTx] = useState(false)\n\n const load = loadingTx\n\n const handleTransfer = async () => {\n if (loadingTx || !suiAccount || !userBill || !signAndExecuteTransaction || !toAddress) return\n\n try {\n setLoadingTx(true)\n\n // The BondNFT object ID is stored in `userBill.address`\n const nftObjectId = userBill?.address\n if (!nftObjectId) throw new Error('Missing bond NFT object ID')\n\n const tx = new Transaction()\n\n // Standard Sui PTB object transfer: move the NFT to the recipient\n tx.transferObjects([tx.object(nftObjectId)], tx.pure.address(toAddress))\n\n tx.setSender(suiAccount)\n tx.setGasBudget(10_000_000)\n\n // Pre-build so the wallet receives fully-resolved bytes\n const suiClient = getSuiClient()\n const builtBytes = await tx.build({ client: suiClient })\n const prebuiltTx = Transaction.from(builtBytes)\n\n const response = await signAndExecuteTransaction({ transaction: prebuiltTx })\n\n const digest = response?.digest\n if (!digest) throw new Error('No tx digest returned by wallet')\n\n await suiClient.waitForTransaction({ digest })\n await verifySuiTxSuccess(digest)\n\n await queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.USER_BONDS] })\n addToastSuccess(digest, ChainId.SUI)\n setTimeout(() => onDismiss?.(), 1500)\n } catch (error: any) {\n console.error('Sui transfer failed:', error)\n addToastError(error?.message ?? 'Unknown error')\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error,\n account: suiAccount ?? '',\n chainId: ChainId.SUI,\n extraInfo: { type: 'suiTransfer', userBill, toAddress, error },\n })\n } finally {\n setLoadingTx(false)\n }\n }\n\n return (\n <Button onClick={handleTransfer} load={load} disabled={load || disabled} fullWidth>\n transfer\n </Button>\n )\n}\n\nexport default TransferActionSui\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,iBAAiB,GAAG,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,SAAS,GAMV,KAAI;;AAEH,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;AAChC,IAAA,MAAM,WAAW,GAAG,cAAc,EAAE;IACpC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,yBAAyB,EAAE,GAAG,aAAa,EAAE;IAC1E,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,SAAS,EAAE;;IAGtD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEjD,MAAM,IAAI,GAAG,SAAS;AAEtB,IAAA,MAAM,cAAc,GAAG,YAAW;AAChC,QAAA,IAAI,SAAS,IAAI,CAAC,UA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ACpC,UAAU,CAAC,MAAM,SAAS,IAAI,EAAE,IAAI,CAAC;QACvC;QAAE,OAAO,KAAU,EAAE;AACnB,YAAA,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC;AAC5C,YAAA,aAAa,CAAC,KAAK,EAAE,OAAO,IAAI,eAAe,CAAC;AAChD,YAAA,WAAW,CAAC;AACV,gBAAA,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK;gBAC9B,KAAK;gBACL,OAAO,EAAE,UAAU,IAAI,EAAE;gBACzB,OAAO,EAAE,OAAO,CAAC,GAAG;gBACpB,SAAS,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;AAC/D,aAAA,CAAC;QACJ;gBAAU;YACR,YAAY,CAAC,KAAK,CAAC;QACrB;AACF,IAAA,CAAC;IAED,QACEA,IAAC,MAAM,EAAA,EAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,IAAI,QAAQ,EAAE,SAAS,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,CAEzE;AAEb;;;;"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Ape Bond SDK",
|
|
4
4
|
"author": "Ape Bond",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "5.1.
|
|
6
|
+
"version": "5.1.51",
|
|
7
7
|
"module": "dist/main.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"types": "dist/main.d.ts",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"wagmi": "2.19.5"
|
|
154
154
|
},
|
|
155
155
|
"dependencies": {
|
|
156
|
-
"@ape.swap/apeswap-lists": "4.5.
|
|
156
|
+
"@ape.swap/apeswap-lists": "4.5.19",
|
|
157
157
|
"@emotion/react": "11.14.0",
|
|
158
158
|
"@jup-ag/api": "6.0.45",
|
|
159
159
|
"bignumber.js": "9.3.1",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { ChainId } from '@ape.swap/apeswap-lists';
|
|
3
|
-
import { UserBillNftData } from '../../types/yourbonds';
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated This hook is deprecated and will be removed in future releases. Do NOT use.
|
|
6
|
-
*/
|
|
7
|
-
export default function useBondNFTData(id?: string, billNftAddress?: string, chainId?: ChainId): UseQueryResult<UserBillNftData | null>;
|
|
8
|
-
export declare const getBondNFTData: (apiV2URL: string, id: string, billNftAddress: string, chainId: ChainId) => Promise<UserBillNftData | null>;
|