@funkit/connect 12.5.0 → 12.6.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.
- package/CHANGELOG.md +36 -0
- package/dist/clients/{chunk-B7UU2ETA.js → chunk-4DBUYTEE.js} +1 -1
- package/dist/clients/{chunk-XOLUUA5B.js → chunk-F36IJA7V.js} +3 -3
- package/dist/clients/{chunk-WCQ6HJ27.js → chunk-I5VRAFH6.js} +1 -1
- package/dist/clients/internal/nado/withdrawalCallback.js +2 -2
- package/dist/clients/internal/nado/withdrawalConfig.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +2 -2
- package/dist/clients/nado.js +2 -2
- package/dist/hooks/useSavedTokenChainSelection.d.ts +16 -0
- package/dist/index.js +323 -214
- package/dist/modals/CheckoutModal/TransferToken/useSavedTransferTokenSelection.d.ts +16 -0
- package/dist/modals/WithdrawalModal/useSavedWithdrawalChain.d.ts +13 -0
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +61 -61
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +5 -5
- package/dist/modals/WithdrawalModal/useWithdrawalChainPreference.d.ts +0 -17
- package/dist/wallets/walletConnectors/chunk-53MYTA42.js +0 -94
- package/dist/wallets/walletConnectors/chunk-65ULY6OC.js +0 -70
- package/dist/wallets/walletConnectors/chunk-A5POD5SV.js +0 -103
- package/dist/wallets/walletConnectors/chunk-ANODOMIN.js +0 -218
- package/dist/wallets/walletConnectors/chunk-ASTCNVJC.js +0 -96
- package/dist/wallets/walletConnectors/chunk-F45CUFRR.js +0 -66
- package/dist/wallets/walletConnectors/chunk-FYPQ3HP4.js +0 -92
- package/dist/wallets/walletConnectors/chunk-IWPW26AL.js +0 -98
- package/dist/wallets/walletConnectors/chunk-JJBLW4IU.js +0 -87
- package/dist/wallets/walletConnectors/chunk-KE4CWI3A.js +0 -93
- package/dist/wallets/walletConnectors/chunk-MWB6LFSG.js +0 -110
- package/dist/wallets/walletConnectors/chunk-OVDCDVFX.js +0 -100
- package/dist/wallets/walletConnectors/chunk-PPQ6L4K2.js +0 -106
- package/dist/wallets/walletConnectors/chunk-RJF2YEZ5.js +0 -92
- package/dist/wallets/walletConnectors/chunk-RQYEGJKL.js +0 -96
- package/dist/wallets/walletConnectors/chunk-TIHTQ3OB.js +0 -95
- package/dist/wallets/walletConnectors/chunk-TM7UBV3Q.js +0 -69
- package/dist/wallets/walletConnectors/chunk-USLZMUJ3.js +0 -99
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 12.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 86ba6ef: Preselect the chain and token a user last deposited from on the Transfer Crypto screen.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 76f165c: Token and recipient comparisons no longer treat two base58 addresses differing only in case as the same address.
|
|
12
|
+
|
|
13
|
+
`isEVMAddressEquivalent` is removed from `@funkit/utils` and `@funkit/connect-core`. Replace it with `isAddressEquivalent`, which takes the same arguments and picks the comparison from the address format: EVM hex folds case, base58 (Solana, Tron) must match exactly.
|
|
14
|
+
|
|
15
|
+
```diff
|
|
16
|
+
-import { isEVMAddressEquivalent } from '@funkit/utils'
|
|
17
|
+
+import { isAddressEquivalent } from '@funkit/utils'
|
|
18
|
+
|
|
19
|
+
-isEVMAddressEquivalent({ firstAddress, secondAddress })
|
|
20
|
+
+isAddressEquivalent({ firstAddress, secondAddress })
|
|
21
|
+
```
|
|
22
|
+
- 9311e00: Make the MetaMask icon smaller so it is more balanced with other wallet icons
|
|
23
|
+
- 86ba6ef: Fix the first chain or token pick after a remembered selection is restored reverting to the default chain.
|
|
24
|
+
- a5e893c: Optionally close the checkout modal shortly after a successful Polymarket perps transfer.
|
|
25
|
+
- 406609f: Refactor how the withdrawal destination chain preference is stored.
|
|
26
|
+
- Updated dependencies [76f165c]
|
|
27
|
+
- Updated dependencies [b29078c]
|
|
28
|
+
- Updated dependencies [b29078c]
|
|
29
|
+
- Updated dependencies [c621550]
|
|
30
|
+
- Updated dependencies [a5e893c]
|
|
31
|
+
- Updated dependencies [6fd317f]
|
|
32
|
+
- Updated dependencies [86ba6ef]
|
|
33
|
+
- Updated dependencies [406609f]
|
|
34
|
+
- @funkit/utils@5.0.0
|
|
35
|
+
- @funkit/connect-core@8.0.0
|
|
36
|
+
- @funkit/fun-relay@3.0.1
|
|
37
|
+
- @funkit/api-base@8.3.1
|
|
38
|
+
|
|
3
39
|
## 12.5.0
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/utils/withdrawal.ts
|
|
4
4
|
import { chainMetadataById } from "@funkit/chains";
|
|
5
|
-
import {
|
|
5
|
+
import { isAddressEquivalent, isTokenEquivalent } from "@funkit/utils";
|
|
6
6
|
import { parseUnits } from "viem";
|
|
7
7
|
function isCustomWithdrawalConfig(config) {
|
|
8
8
|
return "withdrawCallback" in config;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-B5KCBBSV.js";
|
|
6
6
|
import {
|
|
7
7
|
toWithdrawalAmountBaseUnit
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4DBUYTEE.js";
|
|
9
9
|
import {
|
|
10
10
|
getAccount,
|
|
11
11
|
signTypedData,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
getNadoTxNonce,
|
|
43
43
|
x18ToRawBaseUnit
|
|
44
44
|
} from "@funkit/connect-core/clients/nado";
|
|
45
|
-
import {
|
|
45
|
+
import { isAddressEquivalent } from "@funkit/utils";
|
|
46
46
|
|
|
47
47
|
// src/utils/signature.ts
|
|
48
48
|
import { isSwitchChainError, isUserRejectedError } from "@funkit/connect-core";
|
|
@@ -240,7 +240,7 @@ function assertOwnerIsSigner({
|
|
|
240
240
|
wagmiConfig
|
|
241
241
|
}) {
|
|
242
242
|
const connectedAddress = getAccount(wagmiConfig).address;
|
|
243
|
-
if (connectedAddress &&
|
|
243
|
+
if (connectedAddress && isAddressEquivalent({
|
|
244
244
|
firstAddress: connectedAddress,
|
|
245
245
|
secondAddress: walletAddress
|
|
246
246
|
})) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-F36IJA7V.js";
|
|
5
5
|
import "../../chunk-B5KCBBSV.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-4DBUYTEE.js";
|
|
7
7
|
import "../../chunk-OODIKHYE.js";
|
|
8
8
|
import "../../chunk-7GPRX32F.js";
|
|
9
9
|
import "../../chunk-PENJ5JGH.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
isNadoWithdrawalConfig
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-I5VRAFH6.js";
|
|
5
5
|
import {
|
|
6
6
|
PLACEHOLDER_FUNKIT_USER_INFO
|
|
7
7
|
} from "../../chunk-CE42WHAA.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
useFunkitTranslation
|
|
14
14
|
} from "../../chunk-ATNOIBW2.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-4DBUYTEE.js";
|
|
16
16
|
import "../../chunk-2W2P3OS6.js";
|
|
17
17
|
import "../../chunk-7GPRX32F.js";
|
|
18
18
|
import {
|
package/dist/clients/nado.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-F36IJA7V.js";
|
|
5
5
|
import "./chunk-B5KCBBSV.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-4DBUYTEE.js";
|
|
7
7
|
import "./chunk-OODIKHYE.js";
|
|
8
8
|
import {
|
|
9
9
|
useAccount,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TransferTokenDefault as TokenChainSelection } from './useTokenAndChainDropdown';
|
|
2
|
+
export interface UseSavedTokenChainSelectionOptions {
|
|
3
|
+
/** Isolates independent selection flows, e.g. withdrawal and deposit. */
|
|
4
|
+
scope: string;
|
|
5
|
+
/** Owned by the calling flow, so each one rolls out on its own gate. */
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Remembers an account's last chain/token pair per flow. Callers decide what to
|
|
10
|
+
* restore from it: a flow whose token comes from config should keep only the
|
|
11
|
+
* chain, so a config change still outranks a stale stored token.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSavedTokenChainSelection({ scope, enabled, }: UseSavedTokenChainSelectionOptions): {
|
|
14
|
+
savedSelection: TokenChainSelection | undefined;
|
|
15
|
+
saveSelection: (selection: TokenChainSelection) => void;
|
|
16
|
+
};
|