@ab-org/predicate-market-sdk 2.1.1-beta.0 → 2.1.2-beta.0
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.
|
@@ -1750,8 +1750,9 @@ var DepositModal = ({
|
|
|
1750
1750
|
useEffect(() => {
|
|
1751
1751
|
if (view !== "transfer") return;
|
|
1752
1752
|
if (!session?.address || !chain) return;
|
|
1753
|
+
const platform_contract_address = getEnv("PLATFORM_CONTRACT_ADDRESS") || session.address;
|
|
1753
1754
|
registerPlatform({
|
|
1754
|
-
platform_contract_address
|
|
1755
|
+
platform_contract_address,
|
|
1755
1756
|
chain_id: chain
|
|
1756
1757
|
}).then((res) => {
|
|
1757
1758
|
if (res?.deposit_address) {
|
|
@@ -336,7 +336,7 @@ function createFundingWithdrawExecutor(options) {
|
|
|
336
336
|
token_symbol: sourceTokenSymbol,
|
|
337
337
|
token_amount: amountWeiStr,
|
|
338
338
|
token_address: tokenAddress,
|
|
339
|
-
user_address: session.address,
|
|
339
|
+
user_address: options?.userAddress ?? session.address,
|
|
340
340
|
chain_id: fundingChain.chainId
|
|
341
341
|
}
|
|
342
342
|
]
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { notifyTwitterCallback } from './chunk-UAXKA6QC.js';
|
|
2
2
|
export { tryAutoReconnect } from './chunk-LOJTP47I.js';
|
|
3
|
-
export { createDepositController, createFundingWithdrawExecutor, createMarketDataProvider, createPredicateMarketPolicyAdapter, createWithdrawController, fetchErc20Balance, fetchFundingTokenBalance, findTokenDataFromChains, isUsdtWithdrawDirect, parseUnits } from './chunk-
|
|
3
|
+
export { createDepositController, createFundingWithdrawExecutor, createMarketDataProvider, createPredicateMarketPolicyAdapter, createWithdrawController, fetchErc20Balance, fetchFundingTokenBalance, findTokenDataFromChains, isUsdtWithdrawDirect, parseUnits } from './chunk-VKONTJQE.js';
|
|
4
4
|
export { ClientIds, DEFAULT_FUNDING_CHAIN_ID, DEFAULT_FUNDING_TOKEN_ADDRESS, getChainInfo, getFundingTokenAddress } from './chunk-F2UPP3YC.js';
|
|
5
|
-
export { DepositDetailsPanel, DepositModal, DropdownField, SignInModal, Toast, WalletAccount, WalletSelectionModal, WithdrawModal, clearSocialAccountInstance } from './chunk-
|
|
5
|
+
export { DepositDetailsPanel, DepositModal, DropdownField, SignInModal, Toast, WalletAccount, WalletSelectionModal, WithdrawModal, clearSocialAccountInstance } from './chunk-KAMUFSZ7.js';
|
|
6
6
|
export { getExplorerUrl } from './chunk-XB2DFS2W.js';
|
|
7
7
|
export { configureMerchantApi, createOrder, getChains, getDepositOrder, getMerchantApiClient, getWithdrawOrder, quote, registerPlatform } from './chunk-TPMI3XWV.js';
|
|
8
8
|
export { getFixedAuthConfig, getSDKConfig, initSDK } from './chunk-JFRRJXOJ.js';
|
package/dist/merchant.d.ts
CHANGED
|
@@ -155,6 +155,8 @@ declare function parseUnits(value: string, decimals: number): bigint;
|
|
|
155
155
|
interface FundingWithdrawExecutorOptions {
|
|
156
156
|
/** 源链 funding ERC-20 合约地址;默认 {@link getFundingTokenAddress} / env */
|
|
157
157
|
tokenAddress?: string;
|
|
158
|
+
/** 用户地址;默认 {@link sessionStore.getState().session.address} */
|
|
159
|
+
userAddress?: string;
|
|
158
160
|
decimals?: number;
|
|
159
161
|
/**
|
|
160
162
|
* Funding EVM chain id(如 `3131` Tenderly、`56` 主网)。未传时默认 `3131`。
|
package/dist/merchant.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createDepositController, createFundingWithdrawExecutor, createMarketDataProvider, createPredicateMarketPolicyAdapter, createWithdrawController, fetchErc20Balance, fetchFundingTokenBalance, findTokenDataFromChains, isUsdtWithdrawDirect, parseUnits } from './chunk-
|
|
1
|
+
export { createDepositController, createFundingWithdrawExecutor, createMarketDataProvider, createPredicateMarketPolicyAdapter, createWithdrawController, fetchErc20Balance, fetchFundingTokenBalance, findTokenDataFromChains, isUsdtWithdrawDirect, parseUnits } from './chunk-VKONTJQE.js';
|
|
2
2
|
import './chunk-F2UPP3YC.js';
|
|
3
3
|
export { configureMerchantApi, createOrder, getChains, getDepositOrder, getMerchantApiClient, getWithdrawOrder, quote, registerPlatform } from './chunk-TPMI3XWV.js';
|
|
4
4
|
import './chunk-SHLNBZBY.js';
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DepositDetailsPanel, DepositModal, DropdownField, SignInModal, Toast, WalletAccount, WalletSelectionModal, WithdrawModal, clearSocialAccountInstance } from './chunk-
|
|
1
|
+
export { DepositDetailsPanel, DepositModal, DropdownField, SignInModal, Toast, WalletAccount, WalletSelectionModal, WithdrawModal, clearSocialAccountInstance } from './chunk-KAMUFSZ7.js';
|
|
2
2
|
import './chunk-XB2DFS2W.js';
|
|
3
3
|
import './chunk-TPMI3XWV.js';
|
|
4
4
|
import './chunk-SHLNBZBY.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ab-org/predicate-market-sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**/*",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"@types/react": "^18.2.66",
|
|
49
49
|
"typescript": "^5.5.4",
|
|
50
50
|
"tsup": "^8.5.1",
|
|
51
|
-
"@ab-org/oidc-auth": "0.0.16",
|
|
52
51
|
"@ab-org/chains-service": "0.0.8",
|
|
53
|
-
"@ab-org/
|
|
54
|
-
"@ab-org/wallet-utils": "0.0.7"
|
|
52
|
+
"@ab-org/oidc-auth": "0.0.16",
|
|
53
|
+
"@ab-org/wallet-utils": "0.0.7",
|
|
54
|
+
"@ab-org/sign-in-sdk": "0.1.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "pnpm exec tsup",
|