@aurora-is-near/intents-swap-widget 1.20.2 → 2.0.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/README.md +8 -7
- package/dist/components/InputAmount.d.ts +2 -2
- package/dist/{config-LcKrCbn6.js → config-CsHJaepw.js} +253 -243
- package/dist/config-CsHJaepw.js.map +1 -0
- package/dist/config.d.ts +3 -1
- package/dist/config.js +9 -6
- package/dist/config.js.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/ext/alchemy/index.js +1 -1
- package/dist/ext/index.js +1 -1
- package/dist/features/BalanceRpcLoader/index.js +1 -1
- package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
- package/dist/features/ChainsDropdown/index.js +1 -1
- package/dist/features/DepositMethodSwitcher.js +1 -1
- package/dist/features/ErrorBoundary.js +1 -1
- package/dist/features/ExternalDeposit.js +1 -1
- package/dist/features/SendAddress/index.js +1 -1
- package/dist/features/SendAddress/useNotification.js +1 -1
- package/dist/features/SubmitButton/index.js +1 -1
- package/dist/features/SuccessScreen/index.js +1 -1
- package/dist/features/SwapDirectionSwitcher.js +1 -1
- package/dist/features/SwapQuote/SwapQuote.js +1 -1
- package/dist/features/TokenInput/TokenInput.js +1 -1
- package/dist/features/TokenInput/TokenInputSource.js +1 -1
- package/dist/features/TokenInput/TokenInputTarget.js +1 -1
- package/dist/features/TokenInput/WalletBalance.js +1 -1
- package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
- package/dist/features/TokensList/TokenItem.js +1 -1
- package/dist/features/TokensList/TokensList.js +1 -1
- package/dist/features/TokensModal.js +1 -1
- package/dist/features/WalletCompatibilityCheck/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useChains.js +1 -1
- package/dist/hooks/useCompatibilityCheck.js +1 -1
- package/dist/hooks/useExternalDepositStatus.js +1 -1
- package/dist/hooks/useIntentsBalance.js +1 -1
- package/dist/hooks/useMakeDepositAddress.js +1 -1
- package/dist/hooks/useMakeIntentsTransfer.js +1 -1
- package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
- package/dist/hooks/useMakeQuote.js +1 -1
- package/dist/hooks/useMakeQuoteTransfer.js +1 -1
- package/dist/hooks/useMakeTransfer.js +1 -1
- package/dist/hooks/useMergedBalance.js +1 -1
- package/dist/hooks/useTokenInputPair.js +1 -1
- package/dist/hooks/useTokenModal.d.ts +10 -0
- package/dist/hooks/useTokenModal.js +19 -0
- package/dist/hooks/useTokenModal.js.map +1 -0
- package/dist/hooks/useTokens.js +1 -1
- package/dist/hooks/useTokensFiltered.js +1 -1
- package/dist/hooks/useTokensIntentsUnique.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +110 -114
- package/dist/index.js.map +1 -1
- package/dist/localisation.d.ts +2 -7
- package/dist/localisation.js +8 -16
- package/dist/localisation.js.map +1 -1
- package/dist/machine/effects/index.js +1 -1
- package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
- package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
- package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
- package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
- package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
- package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
- package/dist/machine/effects/useWalletConnEffect.js +1 -1
- package/dist/machine/events/index.js +1 -1
- package/dist/machine/events/tokenSelect.js +1 -1
- package/dist/machine/events/validateInputAndMoveTo.js +1 -1
- package/dist/machine/index.js +1 -1
- package/dist/machine/snap.js +1 -1
- package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
- package/dist/machine/subscriptions/index.js +1 -1
- package/dist/presets/widgets/WidgetDeposit.js +42 -46
- package/dist/presets/widgets/WidgetDeposit.js.map +1 -1
- package/dist/presets/widgets/WidgetSwap.js +42 -46
- package/dist/presets/widgets/WidgetSwap.js.map +1 -1
- package/dist/presets/widgets/WidgetWithdraw.js +59 -63
- package/dist/presets/widgets/WidgetWithdraw.js.map +1 -1
- package/dist/types/localisation.d.ts +2 -0
- package/dist/types/localisation.js +2 -0
- package/dist/types/localisation.js.map +1 -0
- package/dist/utils/intents/signers/near.js +1 -1
- package/dist/utils/intents/signers/privy.js +1 -1
- package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
- package/package.json +1 -1
- package/src/config.tsx +23 -6
- package/src/hooks/useMakeDepositAddress.ts +4 -0
- package/src/hooks/useTokenModal.ts +23 -0
- package/src/index.ts +0 -1
- package/src/localisation.tsx +4 -90
- package/src/presets/widgets/WidgetDeposit.tsx +6 -14
- package/src/presets/widgets/WidgetSwap.tsx +7 -14
- package/src/presets/widgets/WidgetWithdraw.tsx +7 -14
- package/src/types/localisation.ts +69 -0
- package/dist/config-LcKrCbn6.js.map +0 -1
package/README.md
CHANGED
|
@@ -68,18 +68,19 @@ variable you can find in `src/theme.css`):
|
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
## Change
|
|
71
|
+
## Change copy
|
|
72
72
|
|
|
73
|
-
To change
|
|
74
|
-
`
|
|
75
|
-
a typo :)
|
|
73
|
+
To change copy within the widget you can pass a `localisation` object to the
|
|
74
|
+
`WidgetConfigProvider`, for example:
|
|
76
75
|
|
|
77
|
-
```
|
|
78
|
-
<
|
|
76
|
+
```tsx
|
|
77
|
+
<WidgetConfigProvider localisation={{ 'quote.result.maxSlippage.label': 'MAX' }}>
|
|
79
78
|
// widget components
|
|
80
|
-
</
|
|
79
|
+
</WidgetConfigProvider>
|
|
81
80
|
```
|
|
82
81
|
|
|
82
|
+
The available keys can be found in the `types/localisation.ts` file.
|
|
83
|
+
|
|
83
84
|
## Development
|
|
84
85
|
|
|
85
86
|
If you want to make changes to the package and submit PRs, here's how you can link the package to your application locally. This allows you to make changes to the package and see the results in your app:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { InputElement } from 'imask';
|
|
2
2
|
import { IMaskMixinProps } from 'react-imask';
|
|
3
3
|
import { Props as InputProps } from './Input';
|
|
4
|
-
export declare const MaskedInputAmount: import('react').ForwardRefExoticComponent<(IMaskMixinProps<InputElement> & Omit<InputProps, "
|
|
4
|
+
export declare const MaskedInputAmount: import('react').ForwardRefExoticComponent<(IMaskMixinProps<InputElement> & Omit<InputProps, "className" | "children"> & {
|
|
5
5
|
rawValue: string;
|
|
6
|
-
}) & import('react').RefAttributes<import('react').ComponentType<IMaskMixinProps<InputElement> & Omit<InputProps, "
|
|
6
|
+
}) & import('react').RefAttributes<import('react').ComponentType<IMaskMixinProps<InputElement> & Omit<InputProps, "className" | "children"> & {
|
|
7
7
|
rawValue: string;
|
|
8
8
|
}>>>;
|
|
9
9
|
export declare const InputAmount: ({ value, setValue, ...props }: Omit<InputProps, "value"> & {
|