@funkit/connect-rn 2.0.0 → 2.1.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 +21 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1033 -276
- package/dist/index.js.map +4 -4
- package/dist/src/flow/FunkitFlowProvider.d.ts +3 -0
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/flow/withdrawalFlowConfig.d.ts +68 -0
- package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -0
- package/dist/src/hooks/useScreenSize.d.ts +4 -0
- package/dist/src/hooks/useScreenSize.d.ts.map +1 -0
- package/dist/src/icons/FigmaSystemIcons.d.ts +1 -0
- package/dist/src/icons/FigmaSystemIcons.d.ts.map +1 -1
- package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
- package/dist/src/providers/useFunkitCheckout.d.ts +9 -3
- package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -1
- package/dist/src/screens/AvailableChainsScreen.d.ts +2 -1
- package/dist/src/screens/AvailableChainsScreen.d.ts.map +1 -1
- package/dist/src/screens/CheckoutBlockedScreen.d.ts.map +1 -1
- package/dist/src/screens/QrCodeScreen.d.ts +10 -10
- package/dist/src/screens/QrCodeScreen.d.ts.map +1 -1
- package/dist/src/screens/WithdrawMethodScreen.d.ts +30 -0
- package/dist/src/screens/WithdrawMethodScreen.d.ts.map +1 -0
- package/dist/src/swapped/SwappedScreen.d.ts +6 -14
- package/dist/src/swapped/SwappedScreen.d.ts.map +1 -1
- package/dist/src/swapped/SwappedScreenShell.d.ts +24 -0
- package/dist/src/swapped/SwappedScreenShell.d.ts.map +1 -0
- package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
- package/dist/src/swapped/SwappedWithdrawScreen.d.ts +20 -0
- package/dist/src/swapped/SwappedWithdrawScreen.d.ts.map +1 -0
- package/dist/src/swapped/webViewSwappedTransport.d.ts +8 -7
- package/dist/src/swapped/webViewSwappedTransport.d.ts.map +1 -1
- package/dist/src/transfer/fops.d.ts +8 -0
- package/dist/src/transfer/fops.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts +11 -0
- package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts.map +1 -0
- package/dist/src/transfer/hooks/useWithdrawalFops.d.ts +39 -0
- package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -0
- package/dist/src/withdrawal/publicClient.d.ts +10 -0
- package/dist/src/withdrawal/publicClient.d.ts.map +1 -0
- package/dist/src/withdrawal/useWithdrawalExecution.d.ts +21 -0
- package/dist/src/withdrawal/useWithdrawalExecution.d.ts.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @funkit/connect-rn
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 88c8874: Execute fiat-withdrawal orders through the host `WithdrawalClient` — a validated Swapped order runs the on-chain leg and reports `onWithdrawalSubmitted(orderId, txHash)`; user rejections stay interactive, failures surface a retryable error and `onWithdrawalError`
|
|
8
|
+
- 1afdd25: Handle the Swapped withdrawal lifecycle messages in the embed (fiat offramp, [5/8]): `webViewSwappedTransport` / `SwappedScreen` parse and relay `SWAPPED_NEW_WITHDRAWAL`, `SWAPPED_WITHDRAWAL_SUCCESSFUL`, and validated `SWAPPED_ORDER_DATA`. The WebView message origin gate is now fail-closed, validating against the last committed navigation URL when a build omits `nativeEvent.url`. Deposit behavior unchanged.
|
|
9
|
+
- 2509eaf: Wire the managed Swapped fiat-offramp flow ([6/8]): `useFunkitCheckout` gains `beginWithdrawal(config)`, and `FunkitFlowProvider` drives the payout-method list → Swapped WebView, capping the sell to `sourceUsdBalance` and blocking below Swapped's minimum. Exports the `WithdrawalFlowConfig` / `WithdrawalClient` contract types. On-chain execution lands in [7/8]; until then a validated order reaches the host via `onWithdrawalOrder`.
|
|
10
|
+
- 140835a: Add the withdrawal FOPs data layer (Swapped fiat offramp, [3/8]): the `WithdrawalFlowConfig` contract types, `useWithdrawalFops` (Statsig-gated payout-method fetch + balance→EUR sell cap), and `useFiatExchangeRates`. Data only — the screen and flow wiring land in later PRs.
|
|
11
|
+
- 0564bb8: Add `WithdrawMethodScreen` (Swapped fiat offramp, [4/8]) — the payout-method picker, a thin composition over `SelectMethodScreen` (bare-list layout) with terminal empty / balance-too-low states. Tested but not yet wired into the flow.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 8211c26: feat(connect-rn): render AvailableChainsScreen as nested sheet with Got it button
|
|
16
|
+
- 916073b: Update CheckoutBlockedScreen to match Figma design: add "Add money" title, swap info icon for alert circle icon, add "View available regions" link text
|
|
17
|
+
- e5320cb: feat(connect-rn): render QrCodeScreen as nested bottom sheet with Done button and responsive padding
|
|
18
|
+
- d0c8554: fix(connect-rn): primary buttons follow the `button` radius token
|
|
19
|
+
|
|
20
|
+
Primary action buttons (Copy/Share, Done, retry, "Got it") hardcoded a full-pill radius instead of reading the themeable `button` token, so brands could not square their buttons. They now use `borderRadius="button"`; the default token is 999, keeping the full-pill look for themes that don't override it.
|
|
21
|
+
|
|
22
|
+
- 89018b6: Split the internal `SwappedScreen` into deposit (`SwappedScreen`) and withdrawal (`SwappedWithdrawScreen`) components with per-mode message handling. No public API or user-facing behavior changes.
|
|
23
|
+
|
|
3
24
|
## 2.0.0
|
|
4
25
|
|
|
5
26
|
### Major Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { CheckoutTokenTransferConfig } from '@funkit/connect-core';
|
|
1
|
+
export type { CheckoutTokenTransferConfig, SwappedSellOrderData, WithdrawalClient, WithdrawalTransaction, } from '@funkit/connect-core';
|
|
2
2
|
export { darkTokens, fontFamilyForWeight, lightTokens, } from './src/theme/tokens';
|
|
3
3
|
export type { FunkitColorTokens, FunkitFontTokens, FunkitFontWeight, FunkitTokens, } from './src/theme/tokens';
|
|
4
4
|
export { defaultDarkTheme, defaultLightTheme, toRestyleTheme, } from './src/theme/toRestyleTheme';
|
|
@@ -17,7 +17,9 @@ export { FunkitProvider } from './src/providers/FunkitProvider';
|
|
|
17
17
|
export type { FunkitProviderProps } from './src/providers/FunkitProvider';
|
|
18
18
|
export type { FunkitConfig } from './src/identity/IdentityContext';
|
|
19
19
|
export { useFunkitCheckout } from './src/providers/useFunkitCheckout';
|
|
20
|
+
export type { FunkitCheckoutCallbacks } from './src/providers/useFunkitCheckout';
|
|
20
21
|
export type { DepositFlowCallbacks, DepositFlowConfig, DynamicTargetAssetCandidate, } from './src/flow/depositFlowConfig';
|
|
22
|
+
export type { WithdrawalFlowCallbacks, WithdrawalFlowConfig, WithdrawalToken, } from './src/flow/withdrawalFlowConfig';
|
|
21
23
|
export type { PaymentMethodOption, ReceiveTokenOption, } from './src/screens/SelectMethodScreen';
|
|
22
24
|
export type { ChainOption } from './src/flow/depositFlowConfig';
|
|
23
25
|
export type { SupportedToken, TokenChainFilter, } from './src/transfer/supportedTokens';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAkBA,YAAY,EACV,2BAA2B,EAC3B,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,WAAW,GACZ,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,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