@n1xyz/wallet-widget 0.0.32 → 0.0.33-alpha.1
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/features/onboarding-flow/N1WalletModal.d.ts +0 -1
- package/dist/features/onboarding-flow/N1WalletModal.js +0 -1
- package/dist/features/onboarding-flow/N1WalletModal.js.map +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/Logic/getPseudoName.d.ts +0 -1
- package/dist/Logic/getPseudoName.js +0 -5826
- package/dist/Logic/getPseudoName.js.map +0 -1
- package/dist/Logic/sessionManager.d.ts +0 -17
- package/dist/Logic/sessionManager.js +0 -38
- package/dist/Logic/sessionManager.js.map +0 -1
- package/dist/Logic/transactionManager.d.ts +0 -19
- package/dist/Logic/transactionManager.js +0 -8
- package/dist/Logic/transactionManager.js.map +0 -1
- package/dist/Logic/utils.d.ts +0 -19
- package/dist/Logic/utils.js +0 -66
- package/dist/Logic/utils.js.map +0 -1
- package/dist/Logic/words.d.ts +0 -9
- package/dist/Logic/words.js +0 -93572
- package/dist/Logic/words.js.map +0 -1
- package/dist/Modal/LoadingFallback.d.ts +0 -2
- package/dist/Modal/LoadingFallback.js +0 -3
- package/dist/Modal/LoadingFallback.js.map +0 -1
- package/dist/Modal/N1WalletModal.d.ts +0 -2
- package/dist/Modal/N1WalletModal.js +0 -93
- package/dist/Modal/N1WalletModal.js.map +0 -1
- package/dist/Modal/NTSFlow/LoadingFallback.d.ts +0 -2
- package/dist/Modal/NTSFlow/LoadingFallback.js +0 -3
- package/dist/Modal/NTSFlow/LoadingFallback.js.map +0 -1
- package/dist/Modal/NTSFlow/NTSFlow.d.ts +0 -4
- package/dist/Modal/NTSFlow/NTSFlow.js +0 -35
- package/dist/Modal/NTSFlow/NTSFlow.js.map +0 -1
- package/dist/Modal/NTSFlow/components/BackButton.d.ts +0 -3
- package/dist/Modal/NTSFlow/components/BackButton.js +0 -26
- package/dist/Modal/NTSFlow/components/BackButton.js.map +0 -1
- package/dist/Modal/NTSFlow/components/ModalHeader.d.ts +0 -1
- package/dist/Modal/NTSFlow/components/ModalHeader.js +0 -21
- package/dist/Modal/NTSFlow/components/ModalHeader.js.map +0 -1
- package/dist/Modal/NTSFlow/index.d.ts +0 -1
- package/dist/Modal/NTSFlow/index.js +0 -2
- package/dist/Modal/NTSFlow/index.js.map +0 -1
- package/dist/Modal/NTSFlow/views/ConnectView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/ConnectView.js +0 -68
- package/dist/Modal/NTSFlow/views/ConnectView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/CreateSessionView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/CreateSessionView.js +0 -246
- package/dist/Modal/NTSFlow/views/CreateSessionView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/CreateUserView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/CreateUserView.js +0 -106
- package/dist/Modal/NTSFlow/views/CreateUserView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/NoWhitelistView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/NoWhitelistView.js +0 -43
- package/dist/Modal/NTSFlow/views/NoWhitelistView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/SigningView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/SigningView.js +0 -6
- package/dist/Modal/NTSFlow/views/SigningView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/SuccessView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/SuccessView.js +0 -11
- package/dist/Modal/NTSFlow/views/SuccessView.js.map +0 -1
- package/dist/Modal/NordFlow/NordFlow.d.ts +0 -9
- package/dist/Modal/NordFlow/NordFlow.js +0 -98
- package/dist/Modal/NordFlow/NordFlow.js.map +0 -1
- package/dist/Modal/NordFlow/components/ChainButton.d.ts +0 -10
- package/dist/Modal/NordFlow/components/ChainButton.js +0 -21
- package/dist/Modal/NordFlow/components/ChainButton.js.map +0 -1
- package/dist/Modal/NordFlow/components/EVMChainsButton.d.ts +0 -9
- package/dist/Modal/NordFlow/components/EVMChainsButton.js +0 -21
- package/dist/Modal/NordFlow/components/EVMChainsButton.js.map +0 -1
- package/dist/Modal/NordFlow/components/Header.d.ts +0 -12
- package/dist/Modal/NordFlow/components/Header.js +0 -45
- package/dist/Modal/NordFlow/components/Header.js.map +0 -1
- package/dist/Modal/NordFlow/components/ImageWithFallback.d.ts +0 -17
- package/dist/Modal/NordFlow/components/ImageWithFallback.js +0 -33
- package/dist/Modal/NordFlow/components/ImageWithFallback.js.map +0 -1
- package/dist/Modal/NordFlow/components/LoadingSquares.d.ts +0 -1
- package/dist/Modal/NordFlow/components/LoadingSquares.js +0 -6
- package/dist/Modal/NordFlow/components/LoadingSquares.js.map +0 -1
- package/dist/Modal/NordFlow/components/MoreButton.d.ts +0 -8
- package/dist/Modal/NordFlow/components/MoreButton.js +0 -19
- package/dist/Modal/NordFlow/components/MoreButton.js.map +0 -1
- package/dist/Modal/NordFlow/components/TransactionTable.d.ts +0 -13
- package/dist/Modal/NordFlow/components/TransactionTable.js +0 -83
- package/dist/Modal/NordFlow/components/TransactionTable.js.map +0 -1
- package/dist/Modal/NordFlow/components/WaitingMessage.d.ts +0 -8
- package/dist/Modal/NordFlow/components/WaitingMessage.js +0 -17
- package/dist/Modal/NordFlow/components/WaitingMessage.js.map +0 -1
- package/dist/Modal/NordFlow/components/index.d.ts +0 -5
- package/dist/Modal/NordFlow/components/index.js +0 -6
- package/dist/Modal/NordFlow/components/index.js.map +0 -1
- package/dist/Modal/NordFlow/constants.d.ts +0 -31
- package/dist/Modal/NordFlow/constants.js +0 -56
- package/dist/Modal/NordFlow/constants.js.map +0 -1
- package/dist/Modal/NordFlow/context/DepositContext.d.ts +0 -29
- package/dist/Modal/NordFlow/context/DepositContext.js +0 -526
- package/dist/Modal/NordFlow/context/DepositContext.js.map +0 -1
- package/dist/Modal/NordFlow/context/FlowContext.d.ts +0 -50
- package/dist/Modal/NordFlow/context/FlowContext.js +0 -192
- package/dist/Modal/NordFlow/context/FlowContext.js.map +0 -1
- package/dist/Modal/NordFlow/context/NordProvider.d.ts +0 -10
- package/dist/Modal/NordFlow/context/NordProvider.js +0 -14
- package/dist/Modal/NordFlow/context/NordProvider.js.map +0 -1
- package/dist/Modal/NordFlow/context/WalletConnectContext.d.ts +0 -20
- package/dist/Modal/NordFlow/context/WalletConnectContext.js +0 -394
- package/dist/Modal/NordFlow/context/WalletConnectContext.js.map +0 -1
- package/dist/Modal/NordFlow/context/flowMachine.d.ts +0 -48
- package/dist/Modal/NordFlow/context/flowMachine.js +0 -83
- package/dist/Modal/NordFlow/context/flowMachine.js.map +0 -1
- package/dist/Modal/NordFlow/context/index.d.ts +0 -5
- package/dist/Modal/NordFlow/context/index.js +0 -8
- package/dist/Modal/NordFlow/context/index.js.map +0 -1
- package/dist/Modal/NordFlow/hoc/index.d.ts +0 -1
- package/dist/Modal/NordFlow/hoc/index.js +0 -2
- package/dist/Modal/NordFlow/hoc/index.js.map +0 -1
- package/dist/Modal/NordFlow/hoc/withImageFallback.d.ts +0 -7
- package/dist/Modal/NordFlow/hoc/withImageFallback.js +0 -61
- package/dist/Modal/NordFlow/hoc/withImageFallback.js.map +0 -1
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.d.ts +0 -18
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.js +0 -181
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.js.map +0 -1
- package/dist/Modal/NordFlow/index.d.ts +0 -1
- package/dist/Modal/NordFlow/index.js +0 -2
- package/dist/Modal/NordFlow/index.js.map +0 -1
- package/dist/Modal/NordFlow/screens/00-IdleScreen.d.ts +0 -6
- package/dist/Modal/NordFlow/screens/00-IdleScreen.js +0 -9
- package/dist/Modal/NordFlow/screens/00-IdleScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/Modal/NordFlow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.d.ts +0 -2
- package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.js +0 -45
- package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.js +0 -358
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.js +0 -66
- package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/04-AmountInputScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/04-AmountInputScreen.js +0 -204
- package/dist/Modal/NordFlow/screens/04-AmountInputScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/Modal/NordFlow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.js +0 -51
- package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/Modal/NordFlow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/Modal/NordFlow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.js +0 -132
- package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.js +0 -30
- package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/07-ErrorScreen.js +0 -14
- package/dist/Modal/NordFlow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/07-FinalSuccessScreen.d.ts +0 -5
- package/dist/Modal/NordFlow/screens/07-FinalSuccessScreen.js +0 -39
- package/dist/Modal/NordFlow/screens/07-FinalSuccessScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/08-ErrorScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/08-ErrorScreen.js +0 -68
- package/dist/Modal/NordFlow/screens/08-ErrorScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.d.ts +0 -5
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.js +0 -52
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/09-ErrorScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/09-ErrorScreen.js +0 -68
- package/dist/Modal/NordFlow/screens/09-ErrorScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/index.d.ts +0 -7
- package/dist/Modal/NordFlow/screens/index.js +0 -8
- package/dist/Modal/NordFlow/screens/index.js.map +0 -1
- package/dist/Modal/NordFlow/types.d.ts +0 -113
- package/dist/Modal/NordFlow/types.js +0 -34
- package/dist/Modal/NordFlow/types.js.map +0 -1
- package/dist/Modal/NordFlow/utils/depositStorage.d.ts +0 -4
- package/dist/Modal/NordFlow/utils/depositStorage.js +0 -48
- package/dist/Modal/NordFlow/utils/depositStorage.js.map +0 -1
- package/dist/Modal/NordFlow/utils/imageUtils.d.ts +0 -21
- package/dist/Modal/NordFlow/utils/imageUtils.js +0 -110
- package/dist/Modal/NordFlow/utils/imageUtils.js.map +0 -1
- package/dist/Modal/NordFlow/utils/index.d.ts +0 -2
- package/dist/Modal/NordFlow/utils/index.js +0 -3
- package/dist/Modal/NordFlow/utils/index.js.map +0 -1
- package/dist/Modal/NordFlow/utils/nordUtils.d.ts +0 -40
- package/dist/Modal/NordFlow/utils/nordUtils.js +0 -64
- package/dist/Modal/NordFlow/utils/nordUtils.js.map +0 -1
- package/dist/Modal/Sidebar/N1Sidebar.d.ts +0 -1
- package/dist/Modal/Sidebar/N1Sidebar.js +0 -203
- package/dist/Modal/Sidebar/N1Sidebar.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketOverview.d.ts +0 -12
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketOverview.js +0 -90
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketOverview.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.d.ts +0 -6
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.js +0 -43
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.d.ts +0 -11
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.js +0 -20
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/NordTradingView.d.ts +0 -1
- package/dist/Modal/Sidebar/NordTradingView/NordTradingView.js +0 -143
- package/dist/Modal/Sidebar/NordTradingView/NordTradingView.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.d.ts +0 -0
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.js +0 -248
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.d.ts +0 -10
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.js +0 -62
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.js +0 -30
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.d.ts +0 -11
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.js +0 -22
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.js +0 -20
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.js +0 -24
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.js +0 -80
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.d.ts +0 -9
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.js +0 -110
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.js +0 -30
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.d.ts +0 -9
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.js +0 -40
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.js +0 -10
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.d.ts +0 -13
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.js +0 -264
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.d.ts +0 -5
- package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.js +0 -113
- package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.d.ts +0 -1
- package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.js +0 -183
- package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.d.ts +0 -0
- package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.js +0 -278
- package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.js.map +0 -1
- package/dist/Provider/LazyWalletProvider.d.ts +0 -1
- package/dist/Provider/LazyWalletProvider.js +0 -230
- package/dist/Provider/LazyWalletProvider.js.map +0 -1
- package/dist/Provider/N1WalletProvider.d.ts +0 -3
- package/dist/Provider/N1WalletProvider.js +0 -266
- package/dist/Provider/N1WalletProvider.js.map +0 -1
- package/dist/Provider/ShadowRootWrapper.d.ts +0 -7
- package/dist/Provider/ShadowRootWrapper.js +0 -7
- package/dist/Provider/ShadowRootWrapper.js.map +0 -1
- package/dist/Provider/WalletErrorBoundary.d.ts +0 -17
- package/dist/Provider/WalletErrorBoundary.js +0 -57
- package/dist/Provider/WalletErrorBoundary.js.map +0 -1
- package/dist/Provider/context.d.ts +0 -5
- package/dist/Provider/context.js +0 -5
- package/dist/Provider/context.js.map +0 -1
- package/dist/Provider/hooks/useNordUserInitialization.d.ts +0 -1
- package/dist/Provider/hooks/useNordUserInitialization.js +0 -306
- package/dist/Provider/hooks/useNordUserInitialization.js.map +0 -1
- package/dist/Provider/hooks.d.ts +0 -2
- package/dist/Provider/hooks.js +0 -17
- package/dist/Provider/hooks.js.map +0 -1
- package/dist/Provider/icons/CoinbaseWalletIcon.d.ts +0 -1
- package/dist/Provider/icons/CoinbaseWalletIcon.js +0 -5
- package/dist/Provider/icons/CoinbaseWalletIcon.js.map +0 -1
- package/dist/Provider/icons/ConnectionDotsSVG.d.ts +0 -1
- package/dist/Provider/icons/ConnectionDotsSVG.js +0 -5
- package/dist/Provider/icons/ConnectionDotsSVG.js.map +0 -1
- package/dist/Provider/icons/MetamaskIcon.d.ts +0 -1
- package/dist/Provider/icons/MetamaskIcon.js +0 -5
- package/dist/Provider/icons/MetamaskIcon.js.map +0 -1
- package/dist/Provider/icons/PhantomIcon.d.ts +0 -1
- package/dist/Provider/icons/PhantomIcon.js +0 -5
- package/dist/Provider/icons/PhantomIcon.js.map +0 -1
- package/dist/Provider/icons/UserIcon.d.ts +0 -1
- package/dist/Provider/icons/UserIcon.js +0 -5
- package/dist/Provider/icons/UserIcon.js.map +0 -1
- package/dist/Provider/icons/WalletConnectIcon.d.ts +0 -1
- package/dist/Provider/icons/WalletConnectIcon.js +0 -5
- package/dist/Provider/icons/WalletConnectIcon.js.map +0 -1
- package/dist/Provider/index.d.ts +0 -3
- package/dist/Provider/index.js +0 -4
- package/dist/Provider/index.js.map +0 -1
- package/dist/Provider/types.d.ts +0 -152
- package/dist/Provider/types.js +0 -21
- package/dist/Provider/types.js.map +0 -1
- package/dist/WidgetButton/N1ConnectButton.d.ts +0 -5
- package/dist/WidgetButton/N1ConnectButton.js +0 -49
- package/dist/WidgetButton/N1ConnectButton.js.map +0 -1
- package/dist/components/QRCodeLoader.d.ts +0 -4
- package/dist/components/QRCodeLoader.js +0 -9
- package/dist/components/QRCodeLoader.js.map +0 -1
- package/dist/components/logos/EVMChainsGroup.d.ts +0 -7
- package/dist/components/logos/EVMChainsGroup.js +0 -19
- package/dist/components/logos/EVMChainsGroup.js.map +0 -1
- package/dist/components/logos/MoreChainsGroup.d.ts +0 -7
- package/dist/components/logos/MoreChainsGroup.js +0 -19
- package/dist/components/logos/MoreChainsGroup.js.map +0 -1
- package/dist/config/nordFlow.d.ts +0 -6
- package/dist/config/nordFlow.js +0 -63
- package/dist/config/nordFlow.js.map +0 -1
- package/dist/embedded-main-css.d.ts +0 -2
- package/dist/embedded-main-css.js +0 -3
- package/dist/embedded-main-css.js.map +0 -1
- package/dist/features/nord-flow/N1WalletModal.d.ts +0 -2
- package/dist/features/nord-flow/N1WalletModal.js +0 -92
- package/dist/features/nord-flow/N1WalletModal.js.map +0 -1
- package/dist/features/nord-flow/NordFlow.d.ts +0 -9
- package/dist/features/nord-flow/NordFlow.js +0 -98
- package/dist/features/nord-flow/NordFlow.js.map +0 -1
- package/dist/features/nord-flow/components/ChainButton.d.ts +0 -10
- package/dist/features/nord-flow/components/ChainButton.js +0 -21
- package/dist/features/nord-flow/components/ChainButton.js.map +0 -1
- package/dist/features/nord-flow/components/Header.d.ts +0 -12
- package/dist/features/nord-flow/components/Header.js +0 -45
- package/dist/features/nord-flow/components/Header.js.map +0 -1
- package/dist/features/nord-flow/components/ImageWithFallback.d.ts +0 -17
- package/dist/features/nord-flow/components/ImageWithFallback.js +0 -33
- package/dist/features/nord-flow/components/ImageWithFallback.js.map +0 -1
- package/dist/features/nord-flow/components/TransactionTable.d.ts +0 -13
- package/dist/features/nord-flow/components/TransactionTable.js +0 -83
- package/dist/features/nord-flow/components/TransactionTable.js.map +0 -1
- package/dist/features/nord-flow/components/WaitingMessage.d.ts +0 -8
- package/dist/features/nord-flow/components/WaitingMessage.js +0 -17
- package/dist/features/nord-flow/components/WaitingMessage.js.map +0 -1
- package/dist/features/nord-flow/components/index.d.ts +0 -5
- package/dist/features/nord-flow/components/index.js +0 -6
- package/dist/features/nord-flow/components/index.js.map +0 -1
- package/dist/features/nord-flow/context/DepositContext.d.ts +0 -29
- package/dist/features/nord-flow/context/DepositContext.js +0 -525
- package/dist/features/nord-flow/context/DepositContext.js.map +0 -1
- package/dist/features/nord-flow/context/FlowContext.d.ts +0 -50
- package/dist/features/nord-flow/context/FlowContext.js +0 -192
- package/dist/features/nord-flow/context/FlowContext.js.map +0 -1
- package/dist/features/nord-flow/context/NordProvider.d.ts +0 -10
- package/dist/features/nord-flow/context/NordProvider.js +0 -14
- package/dist/features/nord-flow/context/NordProvider.js.map +0 -1
- package/dist/features/nord-flow/context/WalletConnectContext.d.ts +0 -21
- package/dist/features/nord-flow/context/WalletConnectContext.js +0 -394
- package/dist/features/nord-flow/context/WalletConnectContext.js.map +0 -1
- package/dist/features/nord-flow/context/debug.d.ts +0 -6
- package/dist/features/nord-flow/context/debug.js +0 -63
- package/dist/features/nord-flow/context/debug.js.map +0 -1
- package/dist/features/nord-flow/context/flowMachine.d.ts +0 -48
- package/dist/features/nord-flow/context/flowMachine.js +0 -83
- package/dist/features/nord-flow/context/flowMachine.js.map +0 -1
- package/dist/features/nord-flow/context/index.d.ts +0 -5
- package/dist/features/nord-flow/context/index.js +0 -8
- package/dist/features/nord-flow/context/index.js.map +0 -1
- package/dist/features/nord-flow/hoc/index.d.ts +0 -1
- package/dist/features/nord-flow/hoc/index.js +0 -2
- package/dist/features/nord-flow/hoc/index.js.map +0 -1
- package/dist/features/nord-flow/hoc/withImageFallback.d.ts +0 -7
- package/dist/features/nord-flow/hoc/withImageFallback.js +0 -61
- package/dist/features/nord-flow/hoc/withImageFallback.js.map +0 -1
- package/dist/features/nord-flow/index.d.ts +0 -1
- package/dist/features/nord-flow/index.js +0 -2
- package/dist/features/nord-flow/index.js.map +0 -1
- package/dist/features/nord-flow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/features/nord-flow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/features/nord-flow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/02-ChainSelectionScreen.d.ts +0 -31
- package/dist/features/nord-flow/screens/02-ChainSelectionScreen.js +0 -101
- package/dist/features/nord-flow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/03-AmountInputScreen.d.ts +0 -6
- package/dist/features/nord-flow/screens/03-AmountInputScreen.js +0 -361
- package/dist/features/nord-flow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/04-DepositProgressScreen.d.ts +0 -3
- package/dist/features/nord-flow/screens/04-DepositProgressScreen.js +0 -31
- package/dist/features/nord-flow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/features/nord-flow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/features/nord-flow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/features/nord-flow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/features/nord-flow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/features/nord-flow/screens/07-ErrorScreen.js +0 -14
- package/dist/features/nord-flow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/index.d.ts +0 -7
- package/dist/features/nord-flow/screens/index.js +0 -8
- package/dist/features/nord-flow/screens/index.js.map +0 -1
- package/dist/features/nord-flow/types.d.ts +0 -113
- package/dist/features/nord-flow/types.js +0 -34
- package/dist/features/nord-flow/types.js.map +0 -1
- package/dist/features/nord-flow/utils/depositStorage.d.ts +0 -4
- package/dist/features/nord-flow/utils/depositStorage.js +0 -48
- package/dist/features/nord-flow/utils/depositStorage.js.map +0 -1
- package/dist/features/nord-flow/utils/imageUtils.d.ts +0 -21
- package/dist/features/nord-flow/utils/imageUtils.js +0 -110
- package/dist/features/nord-flow/utils/imageUtils.js.map +0 -1
- package/dist/features/nord-flow/utils/index.d.ts +0 -2
- package/dist/features/nord-flow/utils/index.js +0 -3
- package/dist/features/nord-flow/utils/index.js.map +0 -1
- package/dist/features/nord-flow/utils/nordUser.d.ts +0 -1
- package/dist/features/nord-flow/utils/nordUser.js +0 -48
- package/dist/features/nord-flow/utils/nordUser.js.map +0 -1
- package/dist/features/nord-flow/utils/nordUtils.d.ts +0 -40
- package/dist/features/nord-flow/utils/nordUtils.js +0 -64
- package/dist/features/nord-flow/utils/nordUtils.js.map +0 -1
- package/dist/features/nord-flow/utils/session.d.ts +0 -17
- package/dist/features/nord-flow/utils/session.js +0 -69
- package/dist/features/nord-flow/utils/session.js.map +0 -1
- package/dist/features/nord-flow/utils/transaction.d.ts +0 -19
- package/dist/features/nord-flow/utils/transaction.js +0 -8
- package/dist/features/nord-flow/utils/transaction.js.map +0 -1
- package/dist/features/nord-flow/utils/utils.d.ts +0 -19
- package/dist/features/nord-flow/utils/utils.js +0 -66
- package/dist/features/nord-flow/utils/utils.js.map +0 -1
- package/dist/features/nord-flow/utils/withImageFallback.d.ts +0 -7
- package/dist/features/nord-flow/utils/withImageFallback.js +0 -61
- package/dist/features/nord-flow/utils/withImageFallback.js.map +0 -1
- package/dist/features/onboarding-flow/providers/FlowStateProvider.d.ts +0 -50
- package/dist/features/onboarding-flow/providers/FlowStateProvider.js +0 -192
- package/dist/features/onboarding-flow/providers/FlowStateProvider.js.map +0 -1
- package/dist/features/onboarding-flow/providers/OnboardingProvider.d.ts +0 -10
- package/dist/features/onboarding-flow/providers/OnboardingProvider.js +0 -14
- package/dist/features/onboarding-flow/providers/OnboardingProvider.js.map +0 -1
- package/dist/features/onboarding-flow/providers/flowMachine.d.ts +0 -48
- package/dist/features/onboarding-flow/providers/flowMachine.js +0 -83
- package/dist/features/onboarding-flow/providers/flowMachine.js.map +0 -1
- package/dist/features/wallet/components/N1ConnectButton.d.ts +0 -5
- package/dist/features/wallet/components/N1ConnectButton.js +0 -49
- package/dist/features/wallet/components/N1ConnectButton.js.map +0 -1
- package/dist/features/wallet/logic/getPseudoName.d.ts +0 -1
- package/dist/features/wallet/logic/getPseudoName.js +0 -5826
- package/dist/features/wallet/logic/getPseudoName.js.map +0 -1
- package/dist/features/wallet/logic/sessionManager.d.ts +0 -17
- package/dist/features/wallet/logic/sessionManager.js +0 -38
- package/dist/features/wallet/logic/sessionManager.js.map +0 -1
- package/dist/features/wallet/logic/transactionManager.d.ts +0 -19
- package/dist/features/wallet/logic/transactionManager.js +0 -8
- package/dist/features/wallet/logic/transactionManager.js.map +0 -1
- package/dist/features/wallet/logic/utils.d.ts +0 -19
- package/dist/features/wallet/logic/utils.js +0 -66
- package/dist/features/wallet/logic/utils.js.map +0 -1
- package/dist/features/wallet/logic/words.d.ts +0 -9
- package/dist/features/wallet/logic/words.js +0 -93572
- package/dist/features/wallet/logic/words.js.map +0 -1
- package/dist/features/wallet/modal/LoadingFallback.d.ts +0 -2
- package/dist/features/wallet/modal/LoadingFallback.js +0 -3
- package/dist/features/wallet/modal/LoadingFallback.js.map +0 -1
- package/dist/features/wallet/modal/N1WalletModal.d.ts +0 -2
- package/dist/features/wallet/modal/N1WalletModal.js +0 -93
- package/dist/features/wallet/modal/N1WalletModal.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/NordFlow.d.ts +0 -9
- package/dist/features/wallet/modal/NordFlow/NordFlow.js +0 -98
- package/dist/features/wallet/modal/NordFlow/NordFlow.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/ChainButton.d.ts +0 -10
- package/dist/features/wallet/modal/NordFlow/components/ChainButton.js +0 -21
- package/dist/features/wallet/modal/NordFlow/components/ChainButton.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/Header.d.ts +0 -12
- package/dist/features/wallet/modal/NordFlow/components/Header.js +0 -45
- package/dist/features/wallet/modal/NordFlow/components/Header.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/ImageWithFallback.d.ts +0 -17
- package/dist/features/wallet/modal/NordFlow/components/ImageWithFallback.js +0 -33
- package/dist/features/wallet/modal/NordFlow/components/ImageWithFallback.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/TransactionTable.d.ts +0 -13
- package/dist/features/wallet/modal/NordFlow/components/TransactionTable.js +0 -83
- package/dist/features/wallet/modal/NordFlow/components/TransactionTable.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/WaitingMessage.d.ts +0 -8
- package/dist/features/wallet/modal/NordFlow/components/WaitingMessage.js +0 -17
- package/dist/features/wallet/modal/NordFlow/components/WaitingMessage.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/index.d.ts +0 -5
- package/dist/features/wallet/modal/NordFlow/components/index.js +0 -6
- package/dist/features/wallet/modal/NordFlow/components/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/constants.d.ts +0 -31
- package/dist/features/wallet/modal/NordFlow/constants.js +0 -56
- package/dist/features/wallet/modal/NordFlow/constants.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/DepositContext.d.ts +0 -29
- package/dist/features/wallet/modal/NordFlow/context/DepositContext.js +0 -526
- package/dist/features/wallet/modal/NordFlow/context/DepositContext.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/FlowContext.d.ts +0 -50
- package/dist/features/wallet/modal/NordFlow/context/FlowContext.js +0 -192
- package/dist/features/wallet/modal/NordFlow/context/FlowContext.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/NordProvider.d.ts +0 -10
- package/dist/features/wallet/modal/NordFlow/context/NordProvider.js +0 -14
- package/dist/features/wallet/modal/NordFlow/context/NordProvider.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/WalletConnectContext.d.ts +0 -20
- package/dist/features/wallet/modal/NordFlow/context/WalletConnectContext.js +0 -394
- package/dist/features/wallet/modal/NordFlow/context/WalletConnectContext.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/flowMachine.d.ts +0 -48
- package/dist/features/wallet/modal/NordFlow/context/flowMachine.js +0 -83
- package/dist/features/wallet/modal/NordFlow/context/flowMachine.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/index.d.ts +0 -5
- package/dist/features/wallet/modal/NordFlow/context/index.js +0 -8
- package/dist/features/wallet/modal/NordFlow/context/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/hoc/index.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/hoc/index.js +0 -2
- package/dist/features/wallet/modal/NordFlow/hoc/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/hoc/withImageFallback.d.ts +0 -7
- package/dist/features/wallet/modal/NordFlow/hoc/withImageFallback.js +0 -61
- package/dist/features/wallet/modal/NordFlow/hoc/withImageFallback.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/index.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/index.js +0 -2
- package/dist/features/wallet/modal/NordFlow/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/features/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/features/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/features/wallet/modal/NordFlow/screens/03-AmountInputScreen.js +0 -358
- package/dist/features/wallet/modal/NordFlow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/features/wallet/modal/NordFlow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/features/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/features/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/07-ErrorScreen.js +0 -14
- package/dist/features/wallet/modal/NordFlow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/index.d.ts +0 -7
- package/dist/features/wallet/modal/NordFlow/screens/index.js +0 -8
- package/dist/features/wallet/modal/NordFlow/screens/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/types.d.ts +0 -113
- package/dist/features/wallet/modal/NordFlow/types.js +0 -34
- package/dist/features/wallet/modal/NordFlow/types.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/utils/depositStorage.d.ts +0 -4
- package/dist/features/wallet/modal/NordFlow/utils/depositStorage.js +0 -48
- package/dist/features/wallet/modal/NordFlow/utils/depositStorage.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/utils/imageUtils.d.ts +0 -21
- package/dist/features/wallet/modal/NordFlow/utils/imageUtils.js +0 -110
- package/dist/features/wallet/modal/NordFlow/utils/imageUtils.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/utils/index.d.ts +0 -2
- package/dist/features/wallet/modal/NordFlow/utils/index.js +0 -3
- package/dist/features/wallet/modal/NordFlow/utils/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/utils/nordUtils.d.ts +0 -40
- package/dist/features/wallet/modal/NordFlow/utils/nordUtils.js +0 -64
- package/dist/features/wallet/modal/NordFlow/utils/nordUtils.js.map +0 -1
- package/dist/features/wallet/provider/LazyWalletProvider.d.ts +0 -1
- package/dist/features/wallet/provider/LazyWalletProvider.js +0 -230
- package/dist/features/wallet/provider/LazyWalletProvider.js.map +0 -1
- package/dist/features/wallet/provider/N1WalletProvider.d.ts +0 -3
- package/dist/features/wallet/provider/N1WalletProvider.js +0 -266
- package/dist/features/wallet/provider/N1WalletProvider.js.map +0 -1
- package/dist/features/wallet/provider/ShadowRootWrapper.d.ts +0 -7
- package/dist/features/wallet/provider/ShadowRootWrapper.js +0 -7
- package/dist/features/wallet/provider/ShadowRootWrapper.js.map +0 -1
- package/dist/features/wallet/provider/WalletErrorBoundary.d.ts +0 -17
- package/dist/features/wallet/provider/WalletErrorBoundary.js +0 -57
- package/dist/features/wallet/provider/WalletErrorBoundary.js.map +0 -1
- package/dist/features/wallet/provider/context.d.ts +0 -5
- package/dist/features/wallet/provider/context.js +0 -5
- package/dist/features/wallet/provider/context.js.map +0 -1
- package/dist/features/wallet/provider/hooks/useNordUserInitialization.d.ts +0 -1
- package/dist/features/wallet/provider/hooks/useNordUserInitialization.js +0 -306
- package/dist/features/wallet/provider/hooks/useNordUserInitialization.js.map +0 -1
- package/dist/features/wallet/provider/hooks.d.ts +0 -2
- package/dist/features/wallet/provider/hooks.js +0 -17
- package/dist/features/wallet/provider/hooks.js.map +0 -1
- package/dist/features/wallet/provider/index.d.ts +0 -3
- package/dist/features/wallet/provider/index.js +0 -4
- package/dist/features/wallet/provider/index.js.map +0 -1
- package/dist/features/wallet/provider/types.d.ts +0 -152
- package/dist/features/wallet/provider/types.js +0 -21
- package/dist/features/wallet/provider/types.js.map +0 -1
- package/dist/features/wallet/styles/embeddedStyles.d.ts +0 -2
- package/dist/features/wallet/styles/embeddedStyles.js +0 -3
- package/dist/features/wallet/styles/embeddedStyles.js.map +0 -1
- package/dist/lib/nord/index.d.ts +0 -2
- package/dist/lib/nord/index.js +0 -59
- package/dist/lib/nord/index.js.map +0 -1
- package/dist/lib/session/index.d.ts +0 -18
- package/dist/lib/session/index.js +0 -70
- package/dist/lib/session/index.js.map +0 -1
- package/dist/lib/session/utils.d.ts +0 -19
- package/dist/lib/session/utils.js +0 -66
- package/dist/lib/session/utils.js.map +0 -1
- package/dist/lib/transaction/index.d.ts +0 -19
- package/dist/lib/transaction/index.js +0 -8
- package/dist/lib/transaction/index.js.map +0 -1
- package/dist/shared/animations/N1Loader.d.ts +0 -11
- package/dist/shared/animations/N1Loader.js +0 -42
- package/dist/shared/animations/N1Loader.js.map +0 -1
- package/dist/shared/animations/N1Loader.json +0 -1
- package/dist/shared/animations/Processing.d.ts +0 -11
- package/dist/shared/animations/Processing.js +0 -42
- package/dist/shared/animations/Processing.js.map +0 -1
- package/dist/shared/animations/Processing.json +0 -1
- package/dist/shared/config/chains.d.ts +0 -29
- package/dist/shared/config/chains.js +0 -39
- package/dist/shared/config/chains.js.map +0 -1
- package/dist/shared/config/nordFlow.d.ts +0 -9
- package/dist/shared/config/nordFlow.js +0 -71
- package/dist/shared/config/nordFlow.js.map +0 -1
- package/dist/shared/config/public.d.ts +0 -2
- package/dist/shared/config/public.js +0 -3
- package/dist/shared/config/public.js.map +0 -1
- package/dist/shared/config/solana.d.ts +0 -13
- package/dist/shared/config/solana.js +0 -19
- package/dist/shared/config/solana.js.map +0 -1
- package/dist/shared/errors/types.d.ts +0 -25
- package/dist/shared/errors/types.js +0 -77
- package/dist/shared/errors/types.js.map +0 -1
- package/dist/shared/polyfills/windowEthereumGuard.d.ts +0 -6
- package/dist/shared/polyfills/windowEthereumGuard.js +0 -28
- package/dist/shared/polyfills/windowEthereumGuard.js.map +0 -1
- package/dist/shared/ui/Logo.d.ts +0 -8
- package/dist/shared/ui/Logo.js +0 -122
- package/dist/shared/ui/Logo.js.map +0 -1
- package/dist/shared/ui/logos/ArbitrumLogo.d.ts +0 -8
- package/dist/shared/ui/logos/ArbitrumLogo.js +0 -6
- package/dist/shared/ui/logos/ArbitrumLogo.js.map +0 -1
- package/dist/shared/ui/logos/BaseLogo.d.ts +0 -8
- package/dist/shared/ui/logos/BaseLogo.js +0 -6
- package/dist/shared/ui/logos/BaseLogo.js.map +0 -1
- package/dist/shared/ui/logos/BeraLogo.d.ts +0 -8
- package/dist/shared/ui/logos/BeraLogo.js +0 -6
- package/dist/shared/ui/logos/BeraLogo.js.map +0 -1
- package/dist/shared/ui/logos/BitcoinLogo.d.ts +0 -8
- package/dist/shared/ui/logos/BitcoinLogo.js +0 -6
- package/dist/shared/ui/logos/BitcoinLogo.js.map +0 -1
- package/dist/shared/ui/logos/EthereumLogo.d.ts +0 -8
- package/dist/shared/ui/logos/EthereumLogo.js +0 -6
- package/dist/shared/ui/logos/EthereumLogo.js.map +0 -1
- package/dist/shared/ui/logos/HyperliquidLogo.d.ts +0 -8
- package/dist/shared/ui/logos/HyperliquidLogo.js +0 -6
- package/dist/shared/ui/logos/HyperliquidLogo.js.map +0 -1
- package/dist/shared/ui/logos/OptimismLogo.d.ts +0 -8
- package/dist/shared/ui/logos/OptimismLogo.js +0 -6
- package/dist/shared/ui/logos/OptimismLogo.js.map +0 -1
- package/dist/shared/ui/logos/SolanaLogo.d.ts +0 -8
- package/dist/shared/ui/logos/SolanaLogo.js +0 -6
- package/dist/shared/ui/logos/SolanaLogo.js.map +0 -1
- package/dist/shared/ui/logos/ZeroOneLogo.d.ts +0 -8
- package/dist/shared/ui/logos/ZeroOneLogo.js +0 -6
- package/dist/shared/ui/logos/ZeroOneLogo.js.map +0 -1
- package/dist/shared/ui/logos/index.d.ts +0 -9
- package/dist/shared/ui/logos/index.js +0 -10
- package/dist/shared/ui/logos/index.js.map +0 -1
- package/dist/shared/utils/dynamicNord.d.ts +0 -2
- package/dist/shared/utils/dynamicNord.js +0 -59
- package/dist/shared/utils/dynamicNord.js.map +0 -1
- package/dist/shared/utils/ed25519.d.ts +0 -8
- package/dist/shared/utils/ed25519.js +0 -87
- package/dist/shared/utils/ed25519.js.map +0 -1
- package/dist/shared/utils/logger.d.ts +0 -21
- package/dist/shared/utils/logger.js +0 -130
- package/dist/shared/utils/logger.js.map +0 -1
- package/dist/shared/utils/shortenString.d.ts +0 -2
- package/dist/shared/utils/shortenString.js +0 -9
- package/dist/shared/utils/shortenString.js.map +0 -1
- package/dist/utils/dynamicImports.js +0 -42
- package/dist/utils/dynamicImports.js.map +0 -1
- package/dist/utils/dynamicNord.d.ts +0 -2
- package/dist/utils/dynamicNord.js +0 -59
- package/dist/utils/dynamicNord.js.map +0 -1
- package/dist/wallet/components/N1ConnectButton.d.ts +0 -5
- package/dist/wallet/components/N1ConnectButton.js +0 -49
- package/dist/wallet/components/N1ConnectButton.js.map +0 -1
- package/dist/wallet/logic/getPseudoName.d.ts +0 -1
- package/dist/wallet/logic/getPseudoName.js +0 -5826
- package/dist/wallet/logic/getPseudoName.js.map +0 -1
- package/dist/wallet/logic/sessionManager.d.ts +0 -17
- package/dist/wallet/logic/sessionManager.js +0 -38
- package/dist/wallet/logic/sessionManager.js.map +0 -1
- package/dist/wallet/logic/transactionManager.d.ts +0 -19
- package/dist/wallet/logic/transactionManager.js +0 -8
- package/dist/wallet/logic/transactionManager.js.map +0 -1
- package/dist/wallet/logic/utils.d.ts +0 -19
- package/dist/wallet/logic/utils.js +0 -66
- package/dist/wallet/logic/utils.js.map +0 -1
- package/dist/wallet/logic/words.d.ts +0 -9
- package/dist/wallet/logic/words.js +0 -93572
- package/dist/wallet/logic/words.js.map +0 -1
- package/dist/wallet/modal/LoadingFallback.d.ts +0 -2
- package/dist/wallet/modal/LoadingFallback.js +0 -3
- package/dist/wallet/modal/LoadingFallback.js.map +0 -1
- package/dist/wallet/modal/N1WalletModal.d.ts +0 -2
- package/dist/wallet/modal/N1WalletModal.js +0 -93
- package/dist/wallet/modal/N1WalletModal.js.map +0 -1
- package/dist/wallet/modal/NordFlow/NordFlow.d.ts +0 -9
- package/dist/wallet/modal/NordFlow/NordFlow.js +0 -98
- package/dist/wallet/modal/NordFlow/NordFlow.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/ChainButton.d.ts +0 -10
- package/dist/wallet/modal/NordFlow/components/ChainButton.js +0 -21
- package/dist/wallet/modal/NordFlow/components/ChainButton.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/Header.d.ts +0 -12
- package/dist/wallet/modal/NordFlow/components/Header.js +0 -45
- package/dist/wallet/modal/NordFlow/components/Header.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/ImageWithFallback.d.ts +0 -17
- package/dist/wallet/modal/NordFlow/components/ImageWithFallback.js +0 -33
- package/dist/wallet/modal/NordFlow/components/ImageWithFallback.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/TransactionTable.d.ts +0 -13
- package/dist/wallet/modal/NordFlow/components/TransactionTable.js +0 -83
- package/dist/wallet/modal/NordFlow/components/TransactionTable.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/WaitingMessage.d.ts +0 -8
- package/dist/wallet/modal/NordFlow/components/WaitingMessage.js +0 -17
- package/dist/wallet/modal/NordFlow/components/WaitingMessage.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/index.d.ts +0 -5
- package/dist/wallet/modal/NordFlow/components/index.js +0 -6
- package/dist/wallet/modal/NordFlow/components/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/constants.d.ts +0 -31
- package/dist/wallet/modal/NordFlow/constants.js +0 -56
- package/dist/wallet/modal/NordFlow/constants.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/DepositContext.d.ts +0 -29
- package/dist/wallet/modal/NordFlow/context/DepositContext.js +0 -526
- package/dist/wallet/modal/NordFlow/context/DepositContext.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/FlowContext.d.ts +0 -50
- package/dist/wallet/modal/NordFlow/context/FlowContext.js +0 -192
- package/dist/wallet/modal/NordFlow/context/FlowContext.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/NordProvider.d.ts +0 -10
- package/dist/wallet/modal/NordFlow/context/NordProvider.js +0 -14
- package/dist/wallet/modal/NordFlow/context/NordProvider.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/WalletConnectContext.d.ts +0 -20
- package/dist/wallet/modal/NordFlow/context/WalletConnectContext.js +0 -394
- package/dist/wallet/modal/NordFlow/context/WalletConnectContext.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/flowMachine.d.ts +0 -48
- package/dist/wallet/modal/NordFlow/context/flowMachine.js +0 -83
- package/dist/wallet/modal/NordFlow/context/flowMachine.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/index.d.ts +0 -5
- package/dist/wallet/modal/NordFlow/context/index.js +0 -8
- package/dist/wallet/modal/NordFlow/context/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/hoc/index.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/hoc/index.js +0 -2
- package/dist/wallet/modal/NordFlow/hoc/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/hoc/withImageFallback.d.ts +0 -7
- package/dist/wallet/modal/NordFlow/hoc/withImageFallback.js +0 -61
- package/dist/wallet/modal/NordFlow/hoc/withImageFallback.js.map +0 -1
- package/dist/wallet/modal/NordFlow/index.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/index.js +0 -2
- package/dist/wallet/modal/NordFlow/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/wallet/modal/NordFlow/screens/03-AmountInputScreen.js +0 -358
- package/dist/wallet/modal/NordFlow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/wallet/modal/NordFlow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/07-ErrorScreen.js +0 -14
- package/dist/wallet/modal/NordFlow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/index.d.ts +0 -7
- package/dist/wallet/modal/NordFlow/screens/index.js +0 -8
- package/dist/wallet/modal/NordFlow/screens/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/types.d.ts +0 -113
- package/dist/wallet/modal/NordFlow/types.js +0 -34
- package/dist/wallet/modal/NordFlow/types.js.map +0 -1
- package/dist/wallet/modal/NordFlow/utils/depositStorage.d.ts +0 -4
- package/dist/wallet/modal/NordFlow/utils/depositStorage.js +0 -48
- package/dist/wallet/modal/NordFlow/utils/depositStorage.js.map +0 -1
- package/dist/wallet/modal/NordFlow/utils/imageUtils.d.ts +0 -21
- package/dist/wallet/modal/NordFlow/utils/imageUtils.js +0 -110
- package/dist/wallet/modal/NordFlow/utils/imageUtils.js.map +0 -1
- package/dist/wallet/modal/NordFlow/utils/index.d.ts +0 -2
- package/dist/wallet/modal/NordFlow/utils/index.js +0 -3
- package/dist/wallet/modal/NordFlow/utils/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/utils/nordUtils.d.ts +0 -40
- package/dist/wallet/modal/NordFlow/utils/nordUtils.js +0 -64
- package/dist/wallet/modal/NordFlow/utils/nordUtils.js.map +0 -1
- package/dist/wallet/modal/flow/NordFlow.d.ts +0 -9
- package/dist/wallet/modal/flow/NordFlow.js +0 -98
- package/dist/wallet/modal/flow/NordFlow.js.map +0 -1
- package/dist/wallet/modal/flow/components/ChainButton.d.ts +0 -10
- package/dist/wallet/modal/flow/components/ChainButton.js +0 -21
- package/dist/wallet/modal/flow/components/ChainButton.js.map +0 -1
- package/dist/wallet/modal/flow/components/Header.d.ts +0 -12
- package/dist/wallet/modal/flow/components/Header.js +0 -45
- package/dist/wallet/modal/flow/components/Header.js.map +0 -1
- package/dist/wallet/modal/flow/components/ImageWithFallback.d.ts +0 -17
- package/dist/wallet/modal/flow/components/ImageWithFallback.js +0 -33
- package/dist/wallet/modal/flow/components/ImageWithFallback.js.map +0 -1
- package/dist/wallet/modal/flow/components/TransactionTable.d.ts +0 -13
- package/dist/wallet/modal/flow/components/TransactionTable.js +0 -83
- package/dist/wallet/modal/flow/components/TransactionTable.js.map +0 -1
- package/dist/wallet/modal/flow/components/WaitingMessage.d.ts +0 -8
- package/dist/wallet/modal/flow/components/WaitingMessage.js +0 -17
- package/dist/wallet/modal/flow/components/WaitingMessage.js.map +0 -1
- package/dist/wallet/modal/flow/components/index.d.ts +0 -5
- package/dist/wallet/modal/flow/components/index.js +0 -6
- package/dist/wallet/modal/flow/components/index.js.map +0 -1
- package/dist/wallet/modal/flow/constants.d.ts +0 -31
- package/dist/wallet/modal/flow/constants.js +0 -56
- package/dist/wallet/modal/flow/constants.js.map +0 -1
- package/dist/wallet/modal/flow/context/DepositContext.d.ts +0 -29
- package/dist/wallet/modal/flow/context/DepositContext.js +0 -526
- package/dist/wallet/modal/flow/context/DepositContext.js.map +0 -1
- package/dist/wallet/modal/flow/context/FlowContext.d.ts +0 -50
- package/dist/wallet/modal/flow/context/FlowContext.js +0 -192
- package/dist/wallet/modal/flow/context/FlowContext.js.map +0 -1
- package/dist/wallet/modal/flow/context/NordProvider.d.ts +0 -10
- package/dist/wallet/modal/flow/context/NordProvider.js +0 -14
- package/dist/wallet/modal/flow/context/NordProvider.js.map +0 -1
- package/dist/wallet/modal/flow/context/WalletConnectContext.d.ts +0 -20
- package/dist/wallet/modal/flow/context/WalletConnectContext.js +0 -394
- package/dist/wallet/modal/flow/context/WalletConnectContext.js.map +0 -1
- package/dist/wallet/modal/flow/context/flowMachine.d.ts +0 -48
- package/dist/wallet/modal/flow/context/flowMachine.js +0 -83
- package/dist/wallet/modal/flow/context/flowMachine.js.map +0 -1
- package/dist/wallet/modal/flow/context/index.d.ts +0 -5
- package/dist/wallet/modal/flow/context/index.js +0 -8
- package/dist/wallet/modal/flow/context/index.js.map +0 -1
- package/dist/wallet/modal/flow/hoc/index.d.ts +0 -1
- package/dist/wallet/modal/flow/hoc/index.js +0 -2
- package/dist/wallet/modal/flow/hoc/index.js.map +0 -1
- package/dist/wallet/modal/flow/hoc/withImageFallback.d.ts +0 -7
- package/dist/wallet/modal/flow/hoc/withImageFallback.js +0 -61
- package/dist/wallet/modal/flow/hoc/withImageFallback.js.map +0 -1
- package/dist/wallet/modal/flow/index.d.ts +0 -1
- package/dist/wallet/modal/flow/index.js +0 -2
- package/dist/wallet/modal/flow/index.js.map +0 -1
- package/dist/wallet/modal/flow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/wallet/modal/flow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/wallet/modal/flow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/wallet/modal/flow/screens/03-AmountInputScreen.js +0 -358
- package/dist/wallet/modal/flow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/wallet/modal/flow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/wallet/modal/flow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/wallet/modal/flow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/07-ErrorScreen.js +0 -14
- package/dist/wallet/modal/flow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/index.d.ts +0 -7
- package/dist/wallet/modal/flow/screens/index.js +0 -8
- package/dist/wallet/modal/flow/screens/index.js.map +0 -1
- package/dist/wallet/modal/flow/state/constants.d.ts +0 -31
- package/dist/wallet/modal/flow/state/constants.js +0 -56
- package/dist/wallet/modal/flow/state/constants.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/DepositContext.d.ts +0 -29
- package/dist/wallet/modal/flow/state/context/DepositContext.js +0 -526
- package/dist/wallet/modal/flow/state/context/DepositContext.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/FlowContext.d.ts +0 -50
- package/dist/wallet/modal/flow/state/context/FlowContext.js +0 -192
- package/dist/wallet/modal/flow/state/context/FlowContext.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/NordProvider.d.ts +0 -10
- package/dist/wallet/modal/flow/state/context/NordProvider.js +0 -14
- package/dist/wallet/modal/flow/state/context/NordProvider.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/WalletConnectContext.d.ts +0 -20
- package/dist/wallet/modal/flow/state/context/WalletConnectContext.js +0 -394
- package/dist/wallet/modal/flow/state/context/WalletConnectContext.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/flowMachine.d.ts +0 -48
- package/dist/wallet/modal/flow/state/context/flowMachine.js +0 -83
- package/dist/wallet/modal/flow/state/context/flowMachine.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/index.d.ts +0 -5
- package/dist/wallet/modal/flow/state/context/index.js +0 -8
- package/dist/wallet/modal/flow/state/context/index.js.map +0 -1
- package/dist/wallet/modal/flow/state/types.d.ts +0 -113
- package/dist/wallet/modal/flow/state/types.js +0 -34
- package/dist/wallet/modal/flow/state/types.js.map +0 -1
- package/dist/wallet/modal/flow/state/utils/depositStorage.d.ts +0 -4
- package/dist/wallet/modal/flow/state/utils/depositStorage.js +0 -48
- package/dist/wallet/modal/flow/state/utils/depositStorage.js.map +0 -1
- package/dist/wallet/modal/flow/state/utils/nordUtils.d.ts +0 -40
- package/dist/wallet/modal/flow/state/utils/nordUtils.js +0 -64
- package/dist/wallet/modal/flow/state/utils/nordUtils.js.map +0 -1
- package/dist/wallet/modal/flow/types.d.ts +0 -113
- package/dist/wallet/modal/flow/types.js +0 -34
- package/dist/wallet/modal/flow/types.js.map +0 -1
- package/dist/wallet/modal/flow/ui/NordFlow.d.ts +0 -9
- package/dist/wallet/modal/flow/ui/NordFlow.js +0 -98
- package/dist/wallet/modal/flow/ui/NordFlow.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/ChainButton.d.ts +0 -10
- package/dist/wallet/modal/flow/ui/components/ChainButton.js +0 -21
- package/dist/wallet/modal/flow/ui/components/ChainButton.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/Header.d.ts +0 -12
- package/dist/wallet/modal/flow/ui/components/Header.js +0 -45
- package/dist/wallet/modal/flow/ui/components/Header.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/ImageWithFallback.d.ts +0 -17
- package/dist/wallet/modal/flow/ui/components/ImageWithFallback.js +0 -33
- package/dist/wallet/modal/flow/ui/components/ImageWithFallback.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/TransactionTable.d.ts +0 -13
- package/dist/wallet/modal/flow/ui/components/TransactionTable.js +0 -83
- package/dist/wallet/modal/flow/ui/components/TransactionTable.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/WaitingMessage.d.ts +0 -8
- package/dist/wallet/modal/flow/ui/components/WaitingMessage.js +0 -17
- package/dist/wallet/modal/flow/ui/components/WaitingMessage.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/index.d.ts +0 -5
- package/dist/wallet/modal/flow/ui/components/index.js +0 -6
- package/dist/wallet/modal/flow/ui/components/index.js.map +0 -1
- package/dist/wallet/modal/flow/ui/hoc/index.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/hoc/index.js +0 -2
- package/dist/wallet/modal/flow/ui/hoc/index.js.map +0 -1
- package/dist/wallet/modal/flow/ui/hoc/withImageFallback.d.ts +0 -7
- package/dist/wallet/modal/flow/ui/hoc/withImageFallback.js +0 -61
- package/dist/wallet/modal/flow/ui/hoc/withImageFallback.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/wallet/modal/flow/ui/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/wallet/modal/flow/ui/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/wallet/modal/flow/ui/screens/03-AmountInputScreen.js +0 -358
- package/dist/wallet/modal/flow/ui/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/04-DepositProgressScreen.js +0 -26
- package/dist/wallet/modal/flow/ui/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/wallet/modal/flow/ui/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/wallet/modal/flow/ui/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/07-ErrorScreen.js +0 -14
- package/dist/wallet/modal/flow/ui/screens/07-ErrorScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/index.d.ts +0 -7
- package/dist/wallet/modal/flow/ui/screens/index.js +0 -8
- package/dist/wallet/modal/flow/ui/screens/index.js.map +0 -1
- package/dist/wallet/modal/flow/ui/utils/imageUtils.d.ts +0 -21
- package/dist/wallet/modal/flow/ui/utils/imageUtils.js +0 -110
- package/dist/wallet/modal/flow/ui/utils/imageUtils.js.map +0 -1
- package/dist/wallet/modal/flow/utils/depositStorage.d.ts +0 -4
- package/dist/wallet/modal/flow/utils/depositStorage.js +0 -48
- package/dist/wallet/modal/flow/utils/depositStorage.js.map +0 -1
- package/dist/wallet/modal/flow/utils/imageUtils.d.ts +0 -21
- package/dist/wallet/modal/flow/utils/imageUtils.js +0 -110
- package/dist/wallet/modal/flow/utils/imageUtils.js.map +0 -1
- package/dist/wallet/modal/flow/utils/index.d.ts +0 -2
- package/dist/wallet/modal/flow/utils/index.js +0 -3
- package/dist/wallet/modal/flow/utils/index.js.map +0 -1
- package/dist/wallet/modal/flow/utils/nordUtils.d.ts +0 -40
- package/dist/wallet/modal/flow/utils/nordUtils.js +0 -64
- package/dist/wallet/modal/flow/utils/nordUtils.js.map +0 -1
- package/dist/wallet/provider/LazyWalletProvider.d.ts +0 -1
- package/dist/wallet/provider/LazyWalletProvider.js +0 -230
- package/dist/wallet/provider/LazyWalletProvider.js.map +0 -1
- package/dist/wallet/provider/N1WalletProvider.d.ts +0 -3
- package/dist/wallet/provider/N1WalletProvider.js +0 -266
- package/dist/wallet/provider/N1WalletProvider.js.map +0 -1
- package/dist/wallet/provider/ShadowRootWrapper.d.ts +0 -7
- package/dist/wallet/provider/ShadowRootWrapper.js +0 -7
- package/dist/wallet/provider/ShadowRootWrapper.js.map +0 -1
- package/dist/wallet/provider/WalletErrorBoundary.d.ts +0 -17
- package/dist/wallet/provider/WalletErrorBoundary.js +0 -57
- package/dist/wallet/provider/WalletErrorBoundary.js.map +0 -1
- package/dist/wallet/provider/context.d.ts +0 -3
- package/dist/wallet/provider/context.js +0 -5
- package/dist/wallet/provider/context.js.map +0 -1
- package/dist/wallet/provider/hooks/useNordUserInitialization.d.ts +0 -1
- package/dist/wallet/provider/hooks/useNordUserInitialization.js +0 -306
- package/dist/wallet/provider/hooks/useNordUserInitialization.js.map +0 -1
- package/dist/wallet/provider/hooks.d.ts +0 -2
- package/dist/wallet/provider/hooks.js +0 -17
- package/dist/wallet/provider/hooks.js.map +0 -1
- package/dist/wallet/provider/index.d.ts +0 -3
- package/dist/wallet/provider/index.js +0 -4
- package/dist/wallet/provider/index.js.map +0 -1
- package/dist/wallet/provider/types.d.ts +0 -152
- package/dist/wallet/provider/types.js +0 -21
- package/dist/wallet/provider/types.js.map +0 -1
- package/dist/wallet/state/flow/constants.d.ts +0 -31
- package/dist/wallet/state/flow/constants.js +0 -56
- package/dist/wallet/state/flow/constants.js.map +0 -1
- package/dist/wallet/state/flow/context/DepositContext.d.ts +0 -29
- package/dist/wallet/state/flow/context/DepositContext.js +0 -525
- package/dist/wallet/state/flow/context/DepositContext.js.map +0 -1
- package/dist/wallet/state/flow/context/FlowContext.d.ts +0 -50
- package/dist/wallet/state/flow/context/FlowContext.js +0 -191
- package/dist/wallet/state/flow/context/FlowContext.js.map +0 -1
- package/dist/wallet/state/flow/context/NordProvider.d.ts +0 -10
- package/dist/wallet/state/flow/context/NordProvider.js +0 -14
- package/dist/wallet/state/flow/context/NordProvider.js.map +0 -1
- package/dist/wallet/state/flow/context/WalletConnectContext.d.ts +0 -20
- package/dist/wallet/state/flow/context/WalletConnectContext.js +0 -393
- package/dist/wallet/state/flow/context/WalletConnectContext.js.map +0 -1
- package/dist/wallet/state/flow/context/flowMachine.d.ts +0 -48
- package/dist/wallet/state/flow/context/flowMachine.js +0 -83
- package/dist/wallet/state/flow/context/flowMachine.js.map +0 -1
- package/dist/wallet/state/flow/context/index.d.ts +0 -5
- package/dist/wallet/state/flow/context/index.js +0 -8
- package/dist/wallet/state/flow/context/index.js.map +0 -1
- package/dist/wallet/state/flow/types.d.ts +0 -113
- package/dist/wallet/state/flow/types.js +0 -34
- package/dist/wallet/state/flow/types.js.map +0 -1
- package/dist/wallet/state/flow/utils/depositStorage.d.ts +0 -4
- package/dist/wallet/state/flow/utils/depositStorage.js +0 -48
- package/dist/wallet/state/flow/utils/depositStorage.js.map +0 -1
- package/dist/wallet/state/flow/utils/nordUtils.d.ts +0 -40
- package/dist/wallet/state/flow/utils/nordUtils.js +0 -64
- package/dist/wallet/state/flow/utils/nordUtils.js.map +0 -1
- package/dist/wallet/state/logic/getPseudoName.d.ts +0 -1
- package/dist/wallet/state/logic/getPseudoName.js +0 -5826
- package/dist/wallet/state/logic/getPseudoName.js.map +0 -1
- package/dist/wallet/state/logic/sessionManager.d.ts +0 -17
- package/dist/wallet/state/logic/sessionManager.js +0 -38
- package/dist/wallet/state/logic/sessionManager.js.map +0 -1
- package/dist/wallet/state/logic/transactionManager.d.ts +0 -19
- package/dist/wallet/state/logic/transactionManager.js +0 -8
- package/dist/wallet/state/logic/transactionManager.js.map +0 -1
- package/dist/wallet/state/logic/utils.d.ts +0 -19
- package/dist/wallet/state/logic/utils.js +0 -66
- package/dist/wallet/state/logic/utils.js.map +0 -1
- package/dist/wallet/state/logic/words.d.ts +0 -9
- package/dist/wallet/state/logic/words.js +0 -93572
- package/dist/wallet/state/logic/words.js.map +0 -1
- package/dist/wallet/state/provider/LazyWalletProvider.d.ts +0 -1
- package/dist/wallet/state/provider/LazyWalletProvider.js +0 -230
- package/dist/wallet/state/provider/LazyWalletProvider.js.map +0 -1
- package/dist/wallet/state/provider/N1WalletProvider.d.ts +0 -3
- package/dist/wallet/state/provider/N1WalletProvider.js +0 -266
- package/dist/wallet/state/provider/N1WalletProvider.js.map +0 -1
- package/dist/wallet/state/provider/WalletErrorBoundary.d.ts +0 -17
- package/dist/wallet/state/provider/WalletErrorBoundary.js +0 -57
- package/dist/wallet/state/provider/WalletErrorBoundary.js.map +0 -1
- package/dist/wallet/state/provider/context.d.ts +0 -5
- package/dist/wallet/state/provider/context.js +0 -5
- package/dist/wallet/state/provider/context.js.map +0 -1
- package/dist/wallet/state/provider/hooks/useNordUserInitialization.d.ts +0 -1
- package/dist/wallet/state/provider/hooks/useNordUserInitialization.js +0 -306
- package/dist/wallet/state/provider/hooks/useNordUserInitialization.js.map +0 -1
- package/dist/wallet/state/provider/hooks.d.ts +0 -2
- package/dist/wallet/state/provider/hooks.js +0 -17
- package/dist/wallet/state/provider/hooks.js.map +0 -1
- package/dist/wallet/state/provider/index.d.ts +0 -3
- package/dist/wallet/state/provider/index.js +0 -4
- package/dist/wallet/state/provider/index.js.map +0 -1
- package/dist/wallet/state/provider/types.d.ts +0 -152
- package/dist/wallet/state/provider/types.js +0 -21
- package/dist/wallet/state/provider/types.js.map +0 -1
- package/dist/wallet/state/utils/getPseudoName.d.ts +0 -1
- package/dist/wallet/state/utils/getPseudoName.js +0 -5826
- package/dist/wallet/state/utils/getPseudoName.js.map +0 -1
- package/dist/wallet/state/utils/sessionManager.d.ts +0 -17
- package/dist/wallet/state/utils/sessionManager.js +0 -38
- package/dist/wallet/state/utils/sessionManager.js.map +0 -1
- package/dist/wallet/state/utils/transactionManager.d.ts +0 -19
- package/dist/wallet/state/utils/transactionManager.js +0 -8
- package/dist/wallet/state/utils/transactionManager.js.map +0 -1
- package/dist/wallet/state/utils/utils.d.ts +0 -18
- package/dist/wallet/state/utils/utils.js +0 -66
- package/dist/wallet/state/utils/utils.js.map +0 -1
- package/dist/wallet/state/utils/words.d.ts +0 -9
- package/dist/wallet/state/utils/words.js +0 -93572
- package/dist/wallet/state/utils/words.js.map +0 -1
- package/dist/wallet/styles/embeddedStyles.d.ts +0 -2
- package/dist/wallet/styles/embeddedStyles.js +0 -3
- package/dist/wallet/styles/embeddedStyles.js.map +0 -1
- package/dist/wallet/ui/N1ConnectButton.d.ts +0 -5
- package/dist/wallet/ui/N1ConnectButton.js +0 -49
- package/dist/wallet/ui/N1ConnectButton.js.map +0 -1
- package/dist/wallet/ui/ShadowRootWrapper.d.ts +0 -7
- package/dist/wallet/ui/ShadowRootWrapper.js +0 -7
- package/dist/wallet/ui/ShadowRootWrapper.js.map +0 -1
- package/dist/wallet/ui/modal/LoadingFallback.d.ts +0 -2
- package/dist/wallet/ui/modal/LoadingFallback.js +0 -3
- package/dist/wallet/ui/modal/LoadingFallback.js.map +0 -1
- package/dist/wallet/ui/modal/N1WalletModal.d.ts +0 -2
- package/dist/wallet/ui/modal/N1WalletModal.js +0 -93
- package/dist/wallet/ui/modal/N1WalletModal.js.map +0 -1
- package/dist/wallet/ui/modal/flow/NordFlow.d.ts +0 -9
- package/dist/wallet/ui/modal/flow/NordFlow.js +0 -98
- package/dist/wallet/ui/modal/flow/NordFlow.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/ChainButton.d.ts +0 -10
- package/dist/wallet/ui/modal/flow/components/ChainButton.js +0 -21
- package/dist/wallet/ui/modal/flow/components/ChainButton.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/Header.d.ts +0 -12
- package/dist/wallet/ui/modal/flow/components/Header.js +0 -45
- package/dist/wallet/ui/modal/flow/components/Header.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/ImageWithFallback.d.ts +0 -17
- package/dist/wallet/ui/modal/flow/components/ImageWithFallback.js +0 -33
- package/dist/wallet/ui/modal/flow/components/ImageWithFallback.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/TransactionTable.d.ts +0 -13
- package/dist/wallet/ui/modal/flow/components/TransactionTable.js +0 -83
- package/dist/wallet/ui/modal/flow/components/TransactionTable.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/WaitingMessage.d.ts +0 -8
- package/dist/wallet/ui/modal/flow/components/WaitingMessage.js +0 -17
- package/dist/wallet/ui/modal/flow/components/WaitingMessage.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/index.d.ts +0 -5
- package/dist/wallet/ui/modal/flow/components/index.js +0 -6
- package/dist/wallet/ui/modal/flow/components/index.js.map +0 -1
- package/dist/wallet/ui/modal/flow/hoc/index.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/hoc/index.js +0 -2
- package/dist/wallet/ui/modal/flow/hoc/index.js.map +0 -1
- package/dist/wallet/ui/modal/flow/hoc/withImageFallback.d.ts +0 -7
- package/dist/wallet/ui/modal/flow/hoc/withImageFallback.js +0 -61
- package/dist/wallet/ui/modal/flow/hoc/withImageFallback.js.map +0 -1
- package/dist/wallet/ui/modal/flow/index.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/index.js +0 -2
- package/dist/wallet/ui/modal/flow/index.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/wallet/ui/modal/flow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/wallet/ui/modal/flow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/wallet/ui/modal/flow/screens/03-AmountInputScreen.js +0 -358
- package/dist/wallet/ui/modal/flow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/wallet/ui/modal/flow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/wallet/ui/modal/flow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/wallet/ui/modal/flow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/07-ErrorScreen.js +0 -14
- package/dist/wallet/ui/modal/flow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/index.d.ts +0 -7
- package/dist/wallet/ui/modal/flow/screens/index.js +0 -8
- package/dist/wallet/ui/modal/flow/screens/index.js.map +0 -1
- package/dist/wallet/ui/modal/flow/utils/imageUtils.d.ts +0 -21
- package/dist/wallet/ui/modal/flow/utils/imageUtils.js +0 -110
- package/dist/wallet/ui/modal/flow/utils/imageUtils.js.map +0 -1
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Bold-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Bold-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Extra-Bold-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Extra-Bold-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Light-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Light-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Medium-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Medium-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Regular-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Regular-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Semi-Bold-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Semi-Bold-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Thin-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Thin-Trial.otf +0 -0
- /package/dist/{main.css → styles/main.css} +0 -0
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// DEPRECATED: This entire component has been deprecated due to errors
|
|
3
|
-
// All code below has been commented out to prevent issues
|
|
4
|
-
/*
|
|
5
|
-
import { useState, useEffect } from 'react';
|
|
6
|
-
import { useN1WalletContext } from '../../../Provider/hooks';
|
|
7
|
-
import { N1SessionMode } from '../../../Provider/types';
|
|
8
|
-
import MarketOverview from './MarketOverview/MarketOverview';
|
|
9
|
-
import OrderBook from './OrderBook/OrderBook';
|
|
10
|
-
import TradeForm from './TradeForm/TradeForm';
|
|
11
|
-
import UserOrders from './UserOrders/UserOrders';
|
|
12
|
-
import UserPositions from './UserPositions/UserPositions';
|
|
13
|
-
import UserBalances from './UserBalances/UserBalances';
|
|
14
|
-
|
|
15
|
-
// Define the available view types
|
|
16
|
-
type ViewType =
|
|
17
|
-
| 'orderbook'
|
|
18
|
-
| 'tradeform'
|
|
19
|
-
| 'orders'
|
|
20
|
-
| 'positions'
|
|
21
|
-
| 'balances'
|
|
22
|
-
| 'history';
|
|
23
|
-
|
|
24
|
-
export default function NordTradingView() {
|
|
25
|
-
const { sessionMode, nord, nordUser } = useN1WalletContext();
|
|
26
|
-
const [selectedMarket, setSelectedMarket] = useState<{symbol: string; id: number} | null>(null);
|
|
27
|
-
const [activeView, setActiveView] = useState<ViewType>('orderbook');
|
|
28
|
-
|
|
29
|
-
// Early return if not in Nord session mode or if Nord/NordUser is not available
|
|
30
|
-
if (sessionMode !== N1SessionMode.Nord || !nord || !nordUser) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Set default selected market if not already set and markets are available
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
if (!selectedMarket && nord.markets?.length > 0) {
|
|
37
|
-
const defaultMarket = nord.markets[0];
|
|
38
|
-
setSelectedMarket({
|
|
39
|
-
symbol: defaultMarket.symbol,
|
|
40
|
-
id: defaultMarket.marketId
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}, [nord.markets, selectedMarket]);
|
|
44
|
-
|
|
45
|
-
// Render the active view component
|
|
46
|
-
const renderActiveView = () => {
|
|
47
|
-
if (!selectedMarket) return null;
|
|
48
|
-
|
|
49
|
-
switch (activeView) {
|
|
50
|
-
case 'orderbook':
|
|
51
|
-
return <OrderBook marketSymbol={selectedMarket.symbol} marketId={selectedMarket.id} />;
|
|
52
|
-
case 'tradeform':
|
|
53
|
-
return <TradeForm marketSymbol={selectedMarket.symbol} marketId={selectedMarket.id} />;
|
|
54
|
-
case 'orders':
|
|
55
|
-
return <UserOrders />;
|
|
56
|
-
case 'positions':
|
|
57
|
-
return (
|
|
58
|
-
<div className="space-y-4">
|
|
59
|
-
<UserPositions />
|
|
60
|
-
<UserBalances />
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
case 'balances':
|
|
64
|
-
return <UserBalances />;
|
|
65
|
-
default:
|
|
66
|
-
return selectedMarket ? (
|
|
67
|
-
<OrderBook marketSymbol={selectedMarket.symbol} marketId={selectedMarket.id} />
|
|
68
|
-
) : null;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// Map view types to display names
|
|
73
|
-
const viewLabels: Record<ViewType, string> = {
|
|
74
|
-
orderbook: 'Order Book',
|
|
75
|
-
tradeform: 'Trade',
|
|
76
|
-
positions: 'Positions',
|
|
77
|
-
orders: 'Orders',
|
|
78
|
-
balances: 'Balances',
|
|
79
|
-
history: 'History',
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<div className="space-y-4 @container">
|
|
84
|
-
<div className="flex flex-col @md:flex-row justify-between items-start @md:items-center bg-transparent mb-3 gap-3 @md:gap-0">
|
|
85
|
-
<div className="flex justify-start gap-2 flex-wrap w-full @md:w-auto">
|
|
86
|
-
{['orderbook', 'tradeform', 'positions', 'orders'].map((view) => (
|
|
87
|
-
<button
|
|
88
|
-
key={view}
|
|
89
|
-
onClick={() => setActiveView(view as ViewType)}
|
|
90
|
-
className={`
|
|
91
|
-
relative px-4 @md:px-5 py-2 text-sm font-medium tracking-wide transition-all duration-150
|
|
92
|
-
border ${
|
|
93
|
-
activeView === view
|
|
94
|
-
? 'border-n1-ww-main/80 text-n1-ww-main bg-n1-ww-main/[0.03] shadow-[0_0_0_1px_rgba(255,68,26,0.1)]'
|
|
95
|
-
: 'border-n1-ww-gray-200 dark:border-n1-ww-gray-800 text-n1-ww-gray-500 dark:text-n1-ww-gray-400 hover:border-n1-ww-gray-300 dark:hover:border-n1-ww-gray-700'
|
|
96
|
-
}
|
|
97
|
-
first:ml-0 last:mr-0 group rounded-[2px] overflow-hidden flex-grow @md:flex-grow-0
|
|
98
|
-
`}
|
|
99
|
-
>
|
|
100
|
-
<span className="relative z-10">
|
|
101
|
-
{viewLabels[view as ViewType]}
|
|
102
|
-
</span>
|
|
103
|
-
<span
|
|
104
|
-
className={`
|
|
105
|
-
absolute inset-0 bg-n1-ww-main/[0.02] opacity-0 transition-opacity duration-150
|
|
106
|
-
${activeView !== view ? 'group-hover:opacity-100' : ''}
|
|
107
|
-
`}
|
|
108
|
-
/>
|
|
109
|
-
</button>
|
|
110
|
-
))}
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<div className="min-w-[160px] w-full @md:w-auto border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-[2px] overflow-visible hover:border-n1-ww-gray-300 dark:hover:border-n1-ww-gray-700 transition-colors duration-150 relative z-20">
|
|
114
|
-
<div className="px-5 py-2 text-sm">
|
|
115
|
-
<MarketOverview
|
|
116
|
-
selectedMarketSymbol={selectedMarket?.symbol || null}
|
|
117
|
-
selectedMarketId={selectedMarket?.id || null}
|
|
118
|
-
onMarketChange={(symbol: string) => {
|
|
119
|
-
const market = nord.markets?.find(m => m.symbol === symbol);
|
|
120
|
-
if (market) {
|
|
121
|
-
setSelectedMarket({
|
|
122
|
-
symbol: market.symbol,
|
|
123
|
-
id: market.marketId
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}}
|
|
127
|
-
/>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
|
|
132
|
-
<div className="border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-[3px] shadow-sm bg-white dark:bg-n1-ww-gray-950">
|
|
133
|
-
{renderActiveView()}
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
*/
|
|
139
|
-
// Temporary replacement component to prevent import errors
|
|
140
|
-
export default function NordTradingView() {
|
|
141
|
-
return (_jsxs("div", { className: "p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-xl text-yellow-600 dark:text-yellow-400 text-center", children: [_jsx("h3", { className: "font-semibold mb-2", children: "Nord Trading View Deprecated" }), _jsx("p", { className: "text-sm", children: "The Nord Trading View has been temporarily disabled due to technical issues." })] }));
|
|
142
|
-
}
|
|
143
|
-
//# sourceMappingURL=NordTradingView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NordTradingView.js","sourceRoot":"","sources":["../../../../src/Modal/Sidebar/NordTradingView/NordTradingView.tsx"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,0DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsIE;AAEF,2DAA2D;AAC3D,MAAM,CAAC,OAAO,UAAU,eAAe;IACrC,OAAO,CACL,eAAK,SAAS,EAAC,oGAAoG,aACjH,aAAI,SAAS,EAAC,oBAAoB,6CAAkC,EACpE,YAAG,SAAS,EAAC,SAAS,6FAAiF,IACnG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// DEPRECATED: This entire component has been deprecated due to errors\n// All code below has been commented out to prevent issues\n\n/*\nimport { useState, useEffect } from 'react';\nimport { useN1WalletContext } from '../../../Provider/hooks';\nimport { N1SessionMode } from '../../../Provider/types';\nimport MarketOverview from './MarketOverview/MarketOverview';\nimport OrderBook from './OrderBook/OrderBook';\nimport TradeForm from './TradeForm/TradeForm';\nimport UserOrders from './UserOrders/UserOrders';\nimport UserPositions from './UserPositions/UserPositions';\nimport UserBalances from './UserBalances/UserBalances';\n\n// Define the available view types\ntype ViewType =\n | 'orderbook'\n | 'tradeform'\n | 'orders'\n | 'positions'\n | 'balances'\n | 'history';\n\nexport default function NordTradingView() {\n const { sessionMode, nord, nordUser } = useN1WalletContext();\n const [selectedMarket, setSelectedMarket] = useState<{symbol: string; id: number} | null>(null);\n const [activeView, setActiveView] = useState<ViewType>('orderbook');\n\n // Early return if not in Nord session mode or if Nord/NordUser is not available\n if (sessionMode !== N1SessionMode.Nord || !nord || !nordUser) {\n return null;\n }\n\n // Set default selected market if not already set and markets are available\n useEffect(() => {\n if (!selectedMarket && nord.markets?.length > 0) {\n const defaultMarket = nord.markets[0];\n setSelectedMarket({\n symbol: defaultMarket.symbol,\n id: defaultMarket.marketId\n });\n }\n }, [nord.markets, selectedMarket]);\n\n // Render the active view component\n const renderActiveView = () => {\n if (!selectedMarket) return null;\n \n switch (activeView) {\n case 'orderbook':\n return <OrderBook marketSymbol={selectedMarket.symbol} marketId={selectedMarket.id} />;\n case 'tradeform':\n return <TradeForm marketSymbol={selectedMarket.symbol} marketId={selectedMarket.id} />;\n case 'orders':\n return <UserOrders />;\n case 'positions':\n return (\n <div className=\"space-y-4\">\n <UserPositions />\n <UserBalances />\n </div>\n );\n case 'balances':\n return <UserBalances />;\n default:\n return selectedMarket ? (\n <OrderBook marketSymbol={selectedMarket.symbol} marketId={selectedMarket.id} />\n ) : null;\n }\n };\n\n // Map view types to display names\n const viewLabels: Record<ViewType, string> = {\n orderbook: 'Order Book',\n tradeform: 'Trade',\n positions: 'Positions',\n orders: 'Orders',\n balances: 'Balances',\n history: 'History',\n };\n\n return (\n <div className=\"space-y-4 @container\">\n <div className=\"flex flex-col @md:flex-row justify-between items-start @md:items-center bg-transparent mb-3 gap-3 @md:gap-0\">\n <div className=\"flex justify-start gap-2 flex-wrap w-full @md:w-auto\">\n {['orderbook', 'tradeform', 'positions', 'orders'].map((view) => (\n <button\n key={view}\n onClick={() => setActiveView(view as ViewType)}\n className={`\n relative px-4 @md:px-5 py-2 text-sm font-medium tracking-wide transition-all duration-150 \n border ${\n activeView === view\n ? 'border-n1-ww-main/80 text-n1-ww-main bg-n1-ww-main/[0.03] shadow-[0_0_0_1px_rgba(255,68,26,0.1)]'\n : 'border-n1-ww-gray-200 dark:border-n1-ww-gray-800 text-n1-ww-gray-500 dark:text-n1-ww-gray-400 hover:border-n1-ww-gray-300 dark:hover:border-n1-ww-gray-700'\n }\n first:ml-0 last:mr-0 group rounded-[2px] overflow-hidden flex-grow @md:flex-grow-0\n `}\n >\n <span className=\"relative z-10\">\n {viewLabels[view as ViewType]}\n </span>\n <span\n className={`\n absolute inset-0 bg-n1-ww-main/[0.02] opacity-0 transition-opacity duration-150\n ${activeView !== view ? 'group-hover:opacity-100' : ''}\n `}\n />\n </button>\n ))}\n </div>\n\n <div className=\"min-w-[160px] w-full @md:w-auto border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-[2px] overflow-visible hover:border-n1-ww-gray-300 dark:hover:border-n1-ww-gray-700 transition-colors duration-150 relative z-20\">\n <div className=\"px-5 py-2 text-sm\">\n <MarketOverview\n selectedMarketSymbol={selectedMarket?.symbol || null}\n selectedMarketId={selectedMarket?.id || null}\n onMarketChange={(symbol: string) => {\n const market = nord.markets?.find(m => m.symbol === symbol);\n if (market) {\n setSelectedMarket({\n symbol: market.symbol,\n id: market.marketId\n });\n }\n }}\n />\n </div>\n </div>\n </div>\n\n <div className=\"border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-[3px] shadow-sm bg-white dark:bg-n1-ww-gray-950\">\n {renderActiveView()}\n </div>\n </div>\n );\n}\n*/\n\n// Temporary replacement component to prevent import errors\nexport default function NordTradingView() {\n return (\n <div className=\"p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-xl text-yellow-600 dark:text-yellow-400 text-center\">\n <h3 className=\"font-semibold mb-2\">Nord Trading View Deprecated</h3>\n <p className=\"text-sm\">The Nord Trading View has been temporarily disabled due to technical issues.</p>\n </div>\n );\n}\n"]}
|
|
File without changes
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// DEPRECATED: This entire component has been deprecated due to errors
|
|
3
|
-
// All code below has been commented out to prevent issues
|
|
4
|
-
/*
|
|
5
|
-
import { useEffect, useState } from 'react';
|
|
6
|
-
import { useN1WalletContext } from '../../../../Provider/hooks';
|
|
7
|
-
import OrderBookHeader from './OrderBookHeader';
|
|
8
|
-
import OrderBookTable from './OrderBookTable';
|
|
9
|
-
// Create a simple implementation for the missing OrderBookDepthVisualizer component
|
|
10
|
-
import { RefreshCw } from 'lucide-react';
|
|
11
|
-
|
|
12
|
-
// Simple implementation of OrderBookDepthVisualizer
|
|
13
|
-
const OrderBookDepthVisualizer = ({
|
|
14
|
-
data,
|
|
15
|
-
maxSize,
|
|
16
|
-
}: {
|
|
17
|
-
data: {
|
|
18
|
-
bids: Array<[number, number]>;
|
|
19
|
-
asks: Array<[number, number]>;
|
|
20
|
-
timestamp: number;
|
|
21
|
-
} | null;
|
|
22
|
-
maxSize: number;
|
|
23
|
-
}) => {
|
|
24
|
-
if (!data || data.bids.length === 0 || data.asks.length === 0) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div className="mt-3">
|
|
30
|
-
<h3 className="text-xs font-medium text-n1-ww-gray-900 dark:text-n1-ww-gray-100 mb-2">
|
|
31
|
-
Depth Chart
|
|
32
|
-
</h3>
|
|
33
|
-
<div className="w-full h-24 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-sm overflow-hidden flex items-center justify-center">
|
|
34
|
-
<div className="relative w-full h-full">
|
|
35
|
-
<div className="absolute inset-0 flex">
|
|
36
|
-
<div className="w-1/2 bg-gradient-to-r from-green-500/10 to-green-500/5"></div>
|
|
37
|
-
<div className="w-1/2 bg-gradient-to-l from-red-500/10 to-red-500/5"></div>
|
|
38
|
-
</div>
|
|
39
|
-
<div className="absolute inset-0 flex items-center justify-center">
|
|
40
|
-
<div className="h-full w-px bg-n1-ww-gray-300 dark:bg-n1-ww-gray-600"></div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
interface OrderBookProps {
|
|
49
|
-
marketSymbol: string | null;
|
|
50
|
-
marketId?: number;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
interface OrderBookData {
|
|
54
|
-
bids: Array<[number, number]>; // [price, size]
|
|
55
|
-
asks: Array<[number, number]>; // [price, size]
|
|
56
|
-
timestamp: number;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Define the OrderbookEntry interface to match the API response
|
|
60
|
-
interface OrderbookEntry {
|
|
61
|
-
price: number;
|
|
62
|
-
size: number;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export default function OrderBook({ marketSymbol, marketId }: OrderBookProps) {
|
|
66
|
-
const { nord } = useN1WalletContext();
|
|
67
|
-
const [orderBookData, setOrderBookData] = useState<OrderBookData | null>(
|
|
68
|
-
null
|
|
69
|
-
);
|
|
70
|
-
const [loading, setLoading] = useState(false);
|
|
71
|
-
const [error, setError] = useState<string | null>(null);
|
|
72
|
-
const [aggregationLevel, setAggregationLevel] = useState<number>(0.01);
|
|
73
|
-
|
|
74
|
-
// Fetch orderbook data when market changes
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
if (!marketSymbol || !nord) return;
|
|
77
|
-
|
|
78
|
-
let subscription: any = null;
|
|
79
|
-
|
|
80
|
-
const fetchOrderBook = async () => {
|
|
81
|
-
setLoading(true);
|
|
82
|
-
setError(null);
|
|
83
|
-
|
|
84
|
-
try {
|
|
85
|
-
// Initial fetch
|
|
86
|
-
const orderbook = await nord.getOrderbook({ symbol: marketSymbol });
|
|
87
|
-
|
|
88
|
-
// The API now returns bids and asks directly as arrays of [price, size] pairs
|
|
89
|
-
// instead of OrderbookEntry objects
|
|
90
|
-
const bids: Array<[number, number]> = Array.isArray(orderbook.bids[0])
|
|
91
|
-
? (orderbook.bids as unknown as Array<[number, number]>)
|
|
92
|
-
: orderbook.bids.map((entry: OrderbookEntry) => [
|
|
93
|
-
entry.price,
|
|
94
|
-
entry.size,
|
|
95
|
-
]);
|
|
96
|
-
|
|
97
|
-
const asks: Array<[number, number]> = Array.isArray(orderbook.asks[0])
|
|
98
|
-
? (orderbook.asks as unknown as Array<[number, number]>)
|
|
99
|
-
: orderbook.asks.map((entry: OrderbookEntry) => [
|
|
100
|
-
entry.price,
|
|
101
|
-
entry.size,
|
|
102
|
-
]);
|
|
103
|
-
|
|
104
|
-
setOrderBookData({
|
|
105
|
-
bids,
|
|
106
|
-
asks,
|
|
107
|
-
timestamp: Date.now(),
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
// Subscribe to real-time updates
|
|
111
|
-
subscription = nord.subscribeOrderbook(marketSymbol);
|
|
112
|
-
subscription.on('update', (update: any) => {
|
|
113
|
-
setOrderBookData((prev) => {
|
|
114
|
-
if (!prev) return update;
|
|
115
|
-
|
|
116
|
-
// Convert OrderbookEntry[] to [number, number][] if needed
|
|
117
|
-
const updatedBids = update.bids
|
|
118
|
-
? update.bids.map((entry: OrderbookEntry) => [
|
|
119
|
-
entry.price,
|
|
120
|
-
entry.size,
|
|
121
|
-
])
|
|
122
|
-
: prev.bids;
|
|
123
|
-
|
|
124
|
-
const updatedAsks = update.asks
|
|
125
|
-
? update.asks.map((entry: OrderbookEntry) => [
|
|
126
|
-
entry.price,
|
|
127
|
-
entry.size,
|
|
128
|
-
])
|
|
129
|
-
: prev.asks;
|
|
130
|
-
|
|
131
|
-
return {
|
|
132
|
-
bids: updatedBids,
|
|
133
|
-
asks: updatedAsks,
|
|
134
|
-
timestamp: Date.now(),
|
|
135
|
-
};
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
} catch (err) {
|
|
139
|
-
console.error('Error fetching orderbook:', err);
|
|
140
|
-
setError('Failed to load orderbook data');
|
|
141
|
-
} finally {
|
|
142
|
-
setLoading(false);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
fetchOrderBook();
|
|
147
|
-
|
|
148
|
-
// Cleanup subscription on unmount or market change
|
|
149
|
-
return () => {
|
|
150
|
-
if (subscription) {
|
|
151
|
-
subscription.close();
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
}, [marketSymbol, nord]);
|
|
155
|
-
|
|
156
|
-
// Aggregate orderbook data based on aggregation level
|
|
157
|
-
const aggregateOrderBook = (
|
|
158
|
-
data: OrderBookData | null,
|
|
159
|
-
level: number
|
|
160
|
-
): OrderBookData | null => {
|
|
161
|
-
if (!data) return null;
|
|
162
|
-
|
|
163
|
-
const aggregatedBids: { [key: number]: number } = {};
|
|
164
|
-
const aggregatedAsks: { [key: number]: number } = {};
|
|
165
|
-
|
|
166
|
-
// Aggregate bids
|
|
167
|
-
data.bids.forEach(([price, size]) => {
|
|
168
|
-
const aggregatedPrice = Math.floor(price / level) * level;
|
|
169
|
-
aggregatedBids[aggregatedPrice] =
|
|
170
|
-
(aggregatedBids[aggregatedPrice] || 0) + size;
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
// Aggregate asks
|
|
174
|
-
data.asks.forEach(([price, size]) => {
|
|
175
|
-
const aggregatedPrice = Math.ceil(price / level) * level;
|
|
176
|
-
aggregatedAsks[aggregatedPrice] =
|
|
177
|
-
(aggregatedAsks[aggregatedPrice] || 0) + size;
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
// Convert back to arrays and sort
|
|
181
|
-
const bids = Object.entries(aggregatedBids)
|
|
182
|
-
.map(([price, size]) => [parseFloat(price), size])
|
|
183
|
-
.sort((a, b) => b[0] - a[0]) as Array<[number, number]>;
|
|
184
|
-
|
|
185
|
-
const asks = Object.entries(aggregatedAsks)
|
|
186
|
-
.map(([price, size]) => [parseFloat(price), size])
|
|
187
|
-
.sort((a, b) => a[0] - b[0]) as Array<[number, number]>;
|
|
188
|
-
|
|
189
|
-
return {
|
|
190
|
-
bids,
|
|
191
|
-
asks,
|
|
192
|
-
timestamp: data.timestamp,
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
const aggregatedData = aggregateOrderBook(orderBookData, aggregationLevel);
|
|
197
|
-
|
|
198
|
-
// Calculate max size for depth visualization
|
|
199
|
-
const calculateMaxSize = (data: OrderBookData | null): number => {
|
|
200
|
-
if (!data) return 0;
|
|
201
|
-
|
|
202
|
-
const bidSizes = data.bids.map(([_, size]) => size);
|
|
203
|
-
const askSizes = data.asks.map(([_, size]) => size);
|
|
204
|
-
const allSizes = [...bidSizes, ...askSizes];
|
|
205
|
-
|
|
206
|
-
return Math.max(...allSizes, 0);
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
const maxSize = calculateMaxSize(aggregatedData);
|
|
210
|
-
|
|
211
|
-
return (
|
|
212
|
-
<div className="p-4">
|
|
213
|
-
<OrderBookHeader
|
|
214
|
-
marketSymbol={marketSymbol}
|
|
215
|
-
aggregationLevel={aggregationLevel}
|
|
216
|
-
onAggregationChange={setAggregationLevel}
|
|
217
|
-
/>
|
|
218
|
-
|
|
219
|
-
{error ? (
|
|
220
|
-
<div className="p-3 mt-3 border border-red-200 dark:border-red-900/30 rounded-sm text-red-600 dark:text-red-400 text-xs">
|
|
221
|
-
{error}
|
|
222
|
-
</div>
|
|
223
|
-
) : loading && !orderBookData ? (
|
|
224
|
-
<div className="flex items-center justify-center h-40 mt-3">
|
|
225
|
-
<RefreshCw size={24} className="text-n1-ww-main n1-animate-spin" />
|
|
226
|
-
</div>
|
|
227
|
-
) : !marketSymbol ? (
|
|
228
|
-
<div className="p-3 mt-3 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-sm text-n1-ww-gray-500 dark:text-n1-ww-gray-400 text-xs">
|
|
229
|
-
Select a market to view orderbook
|
|
230
|
-
</div>
|
|
231
|
-
) : (
|
|
232
|
-
<div className="mt-3">
|
|
233
|
-
<div className="flex flex-col">
|
|
234
|
-
<OrderBookTable
|
|
235
|
-
data={aggregatedData}
|
|
236
|
-
loading={loading}
|
|
237
|
-
maxSize={maxSize}
|
|
238
|
-
/>
|
|
239
|
-
|
|
240
|
-
<OrderBookDepthVisualizer data={aggregatedData} maxSize={maxSize} />
|
|
241
|
-
</div>
|
|
242
|
-
</div>
|
|
243
|
-
)}
|
|
244
|
-
</div>
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
*/
|
|
248
|
-
//# sourceMappingURL=OrderBook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OrderBook.js","sourceRoot":"","sources":["../../../../../src/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.tsx"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,0DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmPE","sourcesContent":["// DEPRECATED: This entire component has been deprecated due to errors\n// All code below has been commented out to prevent issues\n\n/*\nimport { useEffect, useState } from 'react';\nimport { useN1WalletContext } from '../../../../Provider/hooks';\nimport OrderBookHeader from './OrderBookHeader';\nimport OrderBookTable from './OrderBookTable';\n// Create a simple implementation for the missing OrderBookDepthVisualizer component\nimport { RefreshCw } from 'lucide-react';\n\n// Simple implementation of OrderBookDepthVisualizer\nconst OrderBookDepthVisualizer = ({\n data,\n maxSize,\n}: {\n data: {\n bids: Array<[number, number]>;\n asks: Array<[number, number]>;\n timestamp: number;\n } | null;\n maxSize: number;\n}) => {\n if (!data || data.bids.length === 0 || data.asks.length === 0) {\n return null;\n }\n\n return (\n <div className=\"mt-3\">\n <h3 className=\"text-xs font-medium text-n1-ww-gray-900 dark:text-n1-ww-gray-100 mb-2\">\n Depth Chart\n </h3>\n <div className=\"w-full h-24 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-sm overflow-hidden flex items-center justify-center\">\n <div className=\"relative w-full h-full\">\n <div className=\"absolute inset-0 flex\">\n <div className=\"w-1/2 bg-gradient-to-r from-green-500/10 to-green-500/5\"></div>\n <div className=\"w-1/2 bg-gradient-to-l from-red-500/10 to-red-500/5\"></div>\n </div>\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"h-full w-px bg-n1-ww-gray-300 dark:bg-n1-ww-gray-600\"></div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\ninterface OrderBookProps {\n marketSymbol: string | null;\n marketId?: number;\n}\n\ninterface OrderBookData {\n bids: Array<[number, number]>; // [price, size]\n asks: Array<[number, number]>; // [price, size]\n timestamp: number;\n}\n\n// Define the OrderbookEntry interface to match the API response\ninterface OrderbookEntry {\n price: number;\n size: number;\n}\n\nexport default function OrderBook({ marketSymbol, marketId }: OrderBookProps) {\n const { nord } = useN1WalletContext();\n const [orderBookData, setOrderBookData] = useState<OrderBookData | null>(\n null\n );\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [aggregationLevel, setAggregationLevel] = useState<number>(0.01);\n\n // Fetch orderbook data when market changes\n useEffect(() => {\n if (!marketSymbol || !nord) return;\n\n let subscription: any = null;\n\n const fetchOrderBook = async () => {\n setLoading(true);\n setError(null);\n\n try {\n // Initial fetch\n const orderbook = await nord.getOrderbook({ symbol: marketSymbol });\n\n // The API now returns bids and asks directly as arrays of [price, size] pairs\n // instead of OrderbookEntry objects\n const bids: Array<[number, number]> = Array.isArray(orderbook.bids[0])\n ? (orderbook.bids as unknown as Array<[number, number]>)\n : orderbook.bids.map((entry: OrderbookEntry) => [\n entry.price,\n entry.size,\n ]);\n\n const asks: Array<[number, number]> = Array.isArray(orderbook.asks[0])\n ? (orderbook.asks as unknown as Array<[number, number]>)\n : orderbook.asks.map((entry: OrderbookEntry) => [\n entry.price,\n entry.size,\n ]);\n\n setOrderBookData({\n bids,\n asks,\n timestamp: Date.now(),\n });\n\n // Subscribe to real-time updates\n subscription = nord.subscribeOrderbook(marketSymbol);\n subscription.on('update', (update: any) => {\n setOrderBookData((prev) => {\n if (!prev) return update;\n\n // Convert OrderbookEntry[] to [number, number][] if needed\n const updatedBids = update.bids\n ? update.bids.map((entry: OrderbookEntry) => [\n entry.price,\n entry.size,\n ])\n : prev.bids;\n\n const updatedAsks = update.asks\n ? update.asks.map((entry: OrderbookEntry) => [\n entry.price,\n entry.size,\n ])\n : prev.asks;\n\n return {\n bids: updatedBids,\n asks: updatedAsks,\n timestamp: Date.now(),\n };\n });\n });\n } catch (err) {\n console.error('Error fetching orderbook:', err);\n setError('Failed to load orderbook data');\n } finally {\n setLoading(false);\n }\n };\n\n fetchOrderBook();\n\n // Cleanup subscription on unmount or market change\n return () => {\n if (subscription) {\n subscription.close();\n }\n };\n }, [marketSymbol, nord]);\n\n // Aggregate orderbook data based on aggregation level\n const aggregateOrderBook = (\n data: OrderBookData | null,\n level: number\n ): OrderBookData | null => {\n if (!data) return null;\n\n const aggregatedBids: { [key: number]: number } = {};\n const aggregatedAsks: { [key: number]: number } = {};\n\n // Aggregate bids\n data.bids.forEach(([price, size]) => {\n const aggregatedPrice = Math.floor(price / level) * level;\n aggregatedBids[aggregatedPrice] =\n (aggregatedBids[aggregatedPrice] || 0) + size;\n });\n\n // Aggregate asks\n data.asks.forEach(([price, size]) => {\n const aggregatedPrice = Math.ceil(price / level) * level;\n aggregatedAsks[aggregatedPrice] =\n (aggregatedAsks[aggregatedPrice] || 0) + size;\n });\n\n // Convert back to arrays and sort\n const bids = Object.entries(aggregatedBids)\n .map(([price, size]) => [parseFloat(price), size])\n .sort((a, b) => b[0] - a[0]) as Array<[number, number]>;\n\n const asks = Object.entries(aggregatedAsks)\n .map(([price, size]) => [parseFloat(price), size])\n .sort((a, b) => a[0] - b[0]) as Array<[number, number]>;\n\n return {\n bids,\n asks,\n timestamp: data.timestamp,\n };\n };\n\n const aggregatedData = aggregateOrderBook(orderBookData, aggregationLevel);\n\n // Calculate max size for depth visualization\n const calculateMaxSize = (data: OrderBookData | null): number => {\n if (!data) return 0;\n\n const bidSizes = data.bids.map(([_, size]) => size);\n const askSizes = data.asks.map(([_, size]) => size);\n const allSizes = [...bidSizes, ...askSizes];\n\n return Math.max(...allSizes, 0);\n };\n\n const maxSize = calculateMaxSize(aggregatedData);\n\n return (\n <div className=\"p-4\">\n <OrderBookHeader\n marketSymbol={marketSymbol}\n aggregationLevel={aggregationLevel}\n onAggregationChange={setAggregationLevel}\n />\n\n {error ? (\n <div className=\"p-3 mt-3 border border-red-200 dark:border-red-900/30 rounded-sm text-red-600 dark:text-red-400 text-xs\">\n {error}\n </div>\n ) : loading && !orderBookData ? (\n <div className=\"flex items-center justify-center h-40 mt-3\">\n <RefreshCw size={24} className=\"text-n1-ww-main n1-animate-spin\" />\n </div>\n ) : !marketSymbol ? (\n <div className=\"p-3 mt-3 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-sm text-n1-ww-gray-500 dark:text-n1-ww-gray-400 text-xs\">\n Select a market to view orderbook\n </div>\n ) : (\n <div className=\"mt-3\">\n <div className=\"flex flex-col\">\n <OrderBookTable\n data={aggregatedData}\n loading={loading}\n maxSize={maxSize}\n />\n\n <OrderBookDepthVisualizer data={aggregatedData} maxSize={maxSize} />\n </div>\n </div>\n )}\n </div>\n );\n}\n*/"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface OrderBookDepthVisualizerProps {
|
|
2
|
-
data: {
|
|
3
|
-
bids: Array<[number, number]>;
|
|
4
|
-
asks: Array<[number, number]>;
|
|
5
|
-
timestamp: number;
|
|
6
|
-
} | null;
|
|
7
|
-
maxSize: number;
|
|
8
|
-
}
|
|
9
|
-
export default function OrderBookDepthVisualizer({ data, maxSize, }: OrderBookDepthVisualizerProps): JSX.Element | null;
|
|
10
|
-
export {};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export default function OrderBookDepthVisualizer(_a) {
|
|
3
|
-
var data = _a.data, maxSize = _a.maxSize;
|
|
4
|
-
if (!data || data.bids.length === 0 || data.asks.length === 0) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
// Calculate cumulative sizes
|
|
8
|
-
var calculateCumulativeSizes = function (orders) {
|
|
9
|
-
var cumulative = 0;
|
|
10
|
-
return orders.map(function (_a) {
|
|
11
|
-
var price = _a[0], size = _a[1];
|
|
12
|
-
cumulative += size;
|
|
13
|
-
return [price, cumulative];
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var cumulativeBids = calculateCumulativeSizes(data.bids);
|
|
17
|
-
var cumulativeAsks = calculateCumulativeSizes(data.asks);
|
|
18
|
-
// Find max cumulative size for scaling
|
|
19
|
-
var maxCumulativeSize = Math.max(cumulativeBids[cumulativeBids.length - 1][1], cumulativeAsks[cumulativeAsks.length - 1][1]);
|
|
20
|
-
// Calculate price range for x-axis
|
|
21
|
-
var minPrice = cumulativeBids[cumulativeBids.length - 1][0];
|
|
22
|
-
var maxPrice = cumulativeAsks[cumulativeAsks.length - 1][0];
|
|
23
|
-
var priceRange = maxPrice - minPrice;
|
|
24
|
-
// Helper function to calculate x position based on price
|
|
25
|
-
var getPricePosition = function (price) {
|
|
26
|
-
return ((price - minPrice) / priceRange) * 100;
|
|
27
|
-
};
|
|
28
|
-
// Helper function to calculate y position based on cumulative size
|
|
29
|
-
var getSizePosition = function (size) {
|
|
30
|
-
return (size / maxCumulativeSize) * 100;
|
|
31
|
-
};
|
|
32
|
-
// Generate SVG path for bids
|
|
33
|
-
var generateBidPath = function () {
|
|
34
|
-
if (cumulativeBids.length === 0)
|
|
35
|
-
return '';
|
|
36
|
-
var path = "M ".concat(getPricePosition(cumulativeBids[0][0]), " 100 ");
|
|
37
|
-
cumulativeBids.forEach(function (_a) {
|
|
38
|
-
var price = _a[0], size = _a[1];
|
|
39
|
-
var x = getPricePosition(price);
|
|
40
|
-
var y = 100 - getSizePosition(size);
|
|
41
|
-
path += "L ".concat(x, " ").concat(y, " ");
|
|
42
|
-
});
|
|
43
|
-
path += "L ".concat(getPricePosition(cumulativeBids[cumulativeBids.length - 1][0]), " 100 Z");
|
|
44
|
-
return path;
|
|
45
|
-
};
|
|
46
|
-
// Generate SVG path for asks
|
|
47
|
-
var generateAskPath = function () {
|
|
48
|
-
if (cumulativeAsks.length === 0)
|
|
49
|
-
return '';
|
|
50
|
-
var path = "M ".concat(getPricePosition(cumulativeAsks[0][0]), " 100 ");
|
|
51
|
-
cumulativeAsks.forEach(function (_a) {
|
|
52
|
-
var price = _a[0], size = _a[1];
|
|
53
|
-
var x = getPricePosition(price);
|
|
54
|
-
var y = 100 - getSizePosition(size);
|
|
55
|
-
path += "L ".concat(x, " ").concat(y, " ");
|
|
56
|
-
});
|
|
57
|
-
path += "L ".concat(getPricePosition(cumulativeAsks[cumulativeAsks.length - 1][0]), " 100 Z");
|
|
58
|
-
return path;
|
|
59
|
-
};
|
|
60
|
-
return (_jsxs("div", { className: "mt-4", children: [_jsx("h3", { className: "text-sm font-medium text-n1-ww-gray-900 dark:text-n1-ww-gray-100 mb-2", children: "Depth Chart" }), _jsx("div", { className: "w-full h-32 bg-n1-ww-gray-50 dark:bg-n1-ww-gray-800 rounded-lg overflow-hidden", children: _jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 100 100", preserveAspectRatio: "none", children: [_jsx("path", { d: generateBidPath(), fill: "rgba(16, 185, 129, 0.2)", stroke: "rgb(16, 185, 129)", strokeWidth: "0.5" }), _jsx("path", { d: generateAskPath(), fill: "rgba(239, 68, 68, 0.2)", stroke: "rgb(239, 68, 68)", strokeWidth: "0.5" }), _jsx("line", { x1: getPricePosition(data.asks[0][0]), y1: "0", x2: getPricePosition(data.asks[0][0]), y2: "100", stroke: "rgba(156, 163, 175, 0.5)", strokeWidth: "0.5", strokeDasharray: "2,2" })] }) }), _jsxs("div", { className: "flex justify-between mt-1 text-xs text-n1-ww-gray-500 dark:text-n1-ww-gray-400", children: [_jsx("span", { children: minPrice.toFixed(2) }), _jsx("span", { children: ((minPrice + maxPrice) / 2).toFixed(2) }), _jsx("span", { children: maxPrice.toFixed(2) })] })] }));
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=OrderBookDepthVisualizer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OrderBookDepthVisualizer.js","sourceRoot":"","sources":["../../../../../src/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.tsx"],"names":[],"mappings":"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","sourcesContent":["interface OrderBookDepthVisualizerProps {\n data: {\n bids: Array<[number, number]>;\n asks: Array<[number, number]>;\n timestamp: number;\n } | null;\n maxSize: number;\n}\n\nexport default function OrderBookDepthVisualizer({\n data,\n maxSize,\n}: OrderBookDepthVisualizerProps) {\n if (!data || data.bids.length === 0 || data.asks.length === 0) {\n return null;\n }\n\n // Calculate cumulative sizes\n const calculateCumulativeSizes = (\n orders: Array<[number, number]>\n ): Array<[number, number]> => {\n let cumulative = 0;\n return orders.map(([price, size]) => {\n cumulative += size;\n return [price, cumulative];\n });\n };\n\n const cumulativeBids = calculateCumulativeSizes(data.bids);\n const cumulativeAsks = calculateCumulativeSizes(data.asks);\n\n // Find max cumulative size for scaling\n const maxCumulativeSize = Math.max(\n cumulativeBids[cumulativeBids.length - 1][1],\n cumulativeAsks[cumulativeAsks.length - 1][1]\n );\n\n // Calculate price range for x-axis\n const minPrice = cumulativeBids[cumulativeBids.length - 1][0];\n const maxPrice = cumulativeAsks[cumulativeAsks.length - 1][0];\n const priceRange = maxPrice - minPrice;\n\n // Helper function to calculate x position based on price\n const getPricePosition = (price: number): number => {\n return ((price - minPrice) / priceRange) * 100;\n };\n\n // Helper function to calculate y position based on cumulative size\n const getSizePosition = (size: number): number => {\n return (size / maxCumulativeSize) * 100;\n };\n\n // Generate SVG path for bids\n const generateBidPath = (): string => {\n if (cumulativeBids.length === 0) return '';\n\n let path = `M ${getPricePosition(cumulativeBids[0][0])} 100 `;\n\n cumulativeBids.forEach(([price, size]) => {\n const x = getPricePosition(price);\n const y = 100 - getSizePosition(size);\n path += `L ${x} ${y} `;\n });\n\n path += `L ${getPricePosition(cumulativeBids[cumulativeBids.length - 1][0])} 100 Z`;\n\n return path;\n };\n\n // Generate SVG path for asks\n const generateAskPath = (): string => {\n if (cumulativeAsks.length === 0) return '';\n\n let path = `M ${getPricePosition(cumulativeAsks[0][0])} 100 `;\n\n cumulativeAsks.forEach(([price, size]) => {\n const x = getPricePosition(price);\n const y = 100 - getSizePosition(size);\n path += `L ${x} ${y} `;\n });\n\n path += `L ${getPricePosition(cumulativeAsks[cumulativeAsks.length - 1][0])} 100 Z`;\n\n return path;\n };\n\n return (\n <div className=\"mt-4\">\n <h3 className=\"text-sm font-medium text-n1-ww-gray-900 dark:text-n1-ww-gray-100 mb-2\">\n Depth Chart\n </h3>\n <div className=\"w-full h-32 bg-n1-ww-gray-50 dark:bg-n1-ww-gray-800 rounded-lg overflow-hidden\">\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n >\n {/* Bid depth (green) */}\n <path\n d={generateBidPath()}\n fill=\"rgba(16, 185, 129, 0.2)\"\n stroke=\"rgb(16, 185, 129)\"\n strokeWidth=\"0.5\"\n />\n\n {/* Ask depth (red) */}\n <path\n d={generateAskPath()}\n fill=\"rgba(239, 68, 68, 0.2)\"\n stroke=\"rgb(239, 68, 68)\"\n strokeWidth=\"0.5\"\n />\n\n {/* Center line (current price) */}\n <line\n x1={getPricePosition(data.asks[0][0])}\n y1=\"0\"\n x2={getPricePosition(data.asks[0][0])}\n y2=\"100\"\n stroke=\"rgba(156, 163, 175, 0.5)\"\n strokeWidth=\"0.5\"\n strokeDasharray=\"2,2\"\n />\n </svg>\n </div>\n\n {/* Price labels */}\n <div className=\"flex justify-between mt-1 text-xs text-n1-ww-gray-500 dark:text-n1-ww-gray-400\">\n <span>{minPrice.toFixed(2)}</span>\n <span>{((minPrice + maxPrice) / 2).toFixed(2)}</span>\n <span>{maxPrice.toFixed(2)}</span>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface OrderBookHeaderProps {
|
|
2
|
-
marketSymbol: string | null;
|
|
3
|
-
aggregationLevel: number;
|
|
4
|
-
onAggregationChange: (level: number) => void;
|
|
5
|
-
}
|
|
6
|
-
export default function OrderBookHeader({ marketSymbol, aggregationLevel, onAggregationChange, }: OrderBookHeaderProps): JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronDown } from 'lucide-react';
|
|
3
|
-
import { useState, useRef, useEffect } from 'react';
|
|
4
|
-
export default function OrderBookHeader(_a) {
|
|
5
|
-
var marketSymbol = _a.marketSymbol, aggregationLevel = _a.aggregationLevel, onAggregationChange = _a.onAggregationChange;
|
|
6
|
-
var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1];
|
|
7
|
-
var dropdownRef = useRef(null);
|
|
8
|
-
// Common aggregation levels
|
|
9
|
-
var aggregationOptions = [0.0001, 0.001, 0.01, 0.1, 1, 10, 100];
|
|
10
|
-
// Close dropdown when clicking outside
|
|
11
|
-
useEffect(function () {
|
|
12
|
-
function handleClickOutside(event) {
|
|
13
|
-
if (dropdownRef.current &&
|
|
14
|
-
!dropdownRef.current.contains(event.target)) {
|
|
15
|
-
setIsOpen(false);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
19
|
-
return function () {
|
|
20
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
21
|
-
};
|
|
22
|
-
}, []);
|
|
23
|
-
return (_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("h2", { className: "text-base font-semibold text-n1-ww-gray-900 dark:text-n1-ww-gray-100", children: ["Order Book", ' ', marketSymbol ? _jsx("span", { className: "text-n1-ww-main", children: marketSymbol }) : ''] }), _jsxs("div", { className: "relative", ref: dropdownRef, children: [_jsxs("button", { onClick: function () { return setIsOpen(!isOpen); }, className: "flex items-center gap-1 px-2 py-1 bg-n1-ww-gray-100 dark:bg-n1-ww-gray-950 rounded-sm text-xs text-n1-ww-gray-900 dark:text-n1-ww-gray-100 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 hover:border-n1-ww-main dark:hover:border-n1-ww-main transition-colors duration-200", children: [_jsxs("span", { children: ["Precision:", ' ', _jsx("span", { className: "font-mono font-medium", children: aggregationLevel })] }), _jsx(ChevronDown, { size: 14, className: "transition-transform duration-200 ".concat(isOpen ? 'rotate-180 text-n1-ww-main' : 'text-n1-ww-gray-500 dark:text-n1-ww-gray-400') })] }), isOpen && (_jsx("div", { className: "absolute right-0 z-50 mt-1 w-36 bg-white dark:bg-n1-ww-gray-950 rounded-sm shadow-lg border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 overflow-hidden", children: aggregationOptions.map(function (level) { return (_jsx("button", { onClick: function () {
|
|
24
|
-
onAggregationChange(level);
|
|
25
|
-
setIsOpen(false);
|
|
26
|
-
}, className: "w-full text-left px-3 py-1.5 text-xs hover:bg-n1-ww-gray-100 dark:hover:bg-n1-ww-gray-800 transition-colors duration-200 ".concat(aggregationLevel === level
|
|
27
|
-
? 'bg-n1-ww-gray-100 dark:bg-n1-ww-gray-800 border-l-2 border-n1-ww-main text-n1-ww-main'
|
|
28
|
-
: 'text-n1-ww-gray-900 dark:text-n1-ww-gray-100'), children: level }, level)); }) }))] })] }));
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=OrderBookHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OrderBookHeader.js","sourceRoot":"","sources":["../../../../../src/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQpD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAIjB;QAHrB,YAAY,kBAAA,EACZ,gBAAgB,sBAAA,EAChB,mBAAmB,yBAAA;IAEb,IAAA,KAAsB,QAAQ,CAAC,KAAK,CAAC,EAApC,MAAM,QAAA,EAAE,SAAS,QAAmB,CAAC;IAC5C,IAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEjD,4BAA4B;IAC5B,IAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IAElE,uCAAuC;IACvC,SAAS,CAAC;QACR,SAAS,kBAAkB,CAAC,KAAiB;YAC3C,IACE,WAAW,CAAC,OAAO;gBACnB,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EACnD,CAAC;gBACD,SAAS,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;QAED,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAC3D,OAAO;YACL,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAChE,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,eAAK,SAAS,EAAC,mCAAmC,aAChD,cAAI,SAAS,EAAC,sEAAsE,2BACvE,GAAG,EACb,YAAY,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,iBAAiB,YAAE,YAAY,GAAQ,CAAC,CAAC,CAAC,EAAE,IACzE,EAEL,eAAK,SAAS,EAAC,UAAU,EAAC,GAAG,EAAE,WAAW,aACxC,kBACE,OAAO,EAAE,cAAM,OAAA,SAAS,CAAC,CAAC,MAAM,CAAC,EAAlB,CAAkB,EACjC,SAAS,EAAC,wRAAwR,aAElS,yCACa,GAAG,EACd,eAAM,SAAS,EAAC,uBAAuB,YAAE,gBAAgB,GAAQ,IAC5D,EACP,KAAC,WAAW,IACV,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,4CAAqC,MAAM,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,8CAA8C,CAAE,GACxI,IACK,EAER,MAAM,IAAI,CACT,cAAK,SAAS,EAAC,8JAA8J,YAC1K,kBAAkB,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,CACjC,iBAEE,OAAO,EAAE;gCACP,mBAAmB,CAAC,KAAK,CAAC,CAAC;gCAC3B,SAAS,CAAC,KAAK,CAAC,CAAC;4BACnB,CAAC,EACD,SAAS,EAAE,mIACT,gBAAgB,KAAK,KAAK;gCACxB,CAAC,CAAC,uFAAuF;gCACzF,CAAC,CAAC,8CAA8C,CAClD,YAED,KAAK,IAXD,KAAK,CAYH,CACV,EAfkC,CAelC,CAAC,GACE,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { ChevronDown } from 'lucide-react';\nimport { useState, useRef, useEffect } from 'react';\n\ninterface OrderBookHeaderProps {\n marketSymbol: string | null;\n aggregationLevel: number;\n onAggregationChange: (level: number) => void;\n}\n\nexport default function OrderBookHeader({\n marketSymbol,\n aggregationLevel,\n onAggregationChange,\n}: OrderBookHeaderProps) {\n const [isOpen, setIsOpen] = useState(false);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n // Common aggregation levels\n const aggregationOptions = [0.0001, 0.001, 0.01, 0.1, 1, 10, 100];\n\n // Close dropdown when clicking outside\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n if (\n dropdownRef.current &&\n !dropdownRef.current.contains(event.target as Node)\n ) {\n setIsOpen(false);\n }\n }\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, []);\n\n return (\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-base font-semibold text-n1-ww-gray-900 dark:text-n1-ww-gray-100\">\n Order Book{' '}\n {marketSymbol ? <span className=\"text-n1-ww-main\">{marketSymbol}</span> : ''}\n </h2>\n\n <div className=\"relative\" ref={dropdownRef}>\n <button\n onClick={() => setIsOpen(!isOpen)}\n className=\"flex items-center gap-1 px-2 py-1 bg-n1-ww-gray-100 dark:bg-n1-ww-gray-950 rounded-sm text-xs text-n1-ww-gray-900 dark:text-n1-ww-gray-100 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 hover:border-n1-ww-main dark:hover:border-n1-ww-main transition-colors duration-200\"\n >\n <span>\n Precision:{' '}\n <span className=\"font-mono font-medium\">{aggregationLevel}</span>\n </span>\n <ChevronDown\n size={14}\n className={`transition-transform duration-200 ${isOpen ? 'rotate-180 text-n1-ww-main' : 'text-n1-ww-gray-500 dark:text-n1-ww-gray-400'}`}\n />\n </button>\n\n {isOpen && (\n <div className=\"absolute right-0 z-50 mt-1 w-36 bg-white dark:bg-n1-ww-gray-950 rounded-sm shadow-lg border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 overflow-hidden\">\n {aggregationOptions.map((level) => (\n <button\n key={level}\n onClick={() => {\n onAggregationChange(level);\n setIsOpen(false);\n }}\n className={`w-full text-left px-3 py-1.5 text-xs hover:bg-n1-ww-gray-100 dark:hover:bg-n1-ww-gray-800 transition-colors duration-200 ${\n aggregationLevel === level\n ? 'bg-n1-ww-gray-100 dark:bg-n1-ww-gray-800 border-l-2 border-n1-ww-main text-n1-ww-main'\n : 'text-n1-ww-gray-900 dark:text-n1-ww-gray-100'\n }`}\n >\n {level}\n </button>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface OrderBookTableProps {
|
|
2
|
-
data: {
|
|
3
|
-
bids: Array<[number, number]>;
|
|
4
|
-
asks: Array<[number, number]>;
|
|
5
|
-
timestamp: number;
|
|
6
|
-
} | null;
|
|
7
|
-
loading: boolean;
|
|
8
|
-
maxSize: number;
|
|
9
|
-
}
|
|
10
|
-
export default function OrderBookTable({ data, loading, maxSize, }: OrderBookTableProps): JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { RefreshCw } from 'lucide-react';
|
|
3
|
-
export default function OrderBookTable(_a) {
|
|
4
|
-
var data = _a.data, loading = _a.loading, maxSize = _a.maxSize;
|
|
5
|
-
if (!data) {
|
|
6
|
-
return (_jsx("div", { className: "flex items-center justify-center h-40", children: _jsx("p", { className: "text-xs text-n1-ww-gray-500 dark:text-n1-ww-gray-400", children: "No orderbook data available" }) }));
|
|
7
|
-
}
|
|
8
|
-
// Limit the number of rows to display
|
|
9
|
-
var maxRows = 8;
|
|
10
|
-
var bids = data.bids.slice(0, maxRows);
|
|
11
|
-
var asks = data.asks.slice(0, maxRows).reverse(); // Reverse to show highest ask at the bottom
|
|
12
|
-
return (_jsxs("div", { className: "relative", children: [loading && (_jsx("div", { className: "absolute top-2 right-2 z-10", children: _jsx(RefreshCw, { size: 14, className: "text-n1-ww-main n1-animate-spin" }) })), _jsxs("div", { className: "grid grid-cols-3 gap-1 mb-1 text-[10px] text-n1-ww-gray-500 dark:text-n1-ww-gray-400 font-medium uppercase tracking-wider", children: [_jsx("div", { className: "text-left", children: "Size" }), _jsx("div", { className: "text-center", children: "Price" }), _jsx("div", { className: "text-right", children: "Size" })] }), _jsx("div", { className: "space-y-px mb-2", children: asks.map(function (_a, index) {
|
|
13
|
-
var price = _a[0], size = _a[1];
|
|
14
|
-
var sizePercentage = (size / maxSize) * 100;
|
|
15
|
-
return (_jsxs("div", { className: "grid grid-cols-3 gap-1 relative", children: [_jsx("div", { className: "text-left text-xs" }), _jsx("div", { className: "text-center text-xs font-medium text-red-600 dark:text-red-400 font-mono z-10", children: price.toFixed(4) }), _jsx("div", { className: "text-right text-xs font-medium text-n1-ww-gray-900 dark:text-n1-ww-gray-100 font-mono z-10", children: size.toFixed(4) }), _jsx("div", { className: "absolute top-0 right-0 h-full bg-red-100/50 dark:bg-red-900/10 z-0", style: { width: "".concat(sizePercentage, "%") } })] }, "ask-".concat(index)));
|
|
16
|
-
}) }), bids.length > 0 && asks.length > 0 && (_jsx("div", { className: "py-1 px-2 mb-2 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-sm text-center", children: _jsxs("span", { className: "text-[10px] text-n1-ww-gray-500 dark:text-n1-ww-gray-400", children: ["Spread:", ' ', _jsx("span", { className: "font-mono font-medium", children: (asks[asks.length - 1][0] - bids[0][0]).toFixed(4) }), ' ', "(", _jsxs("span", { className: "font-mono", children: [((asks[asks.length - 1][0] / bids[0][0] - 1) * 100).toFixed(2), "%"] }), ")"] }) })), _jsx("div", { className: "space-y-px", children: bids.map(function (_a, index) {
|
|
17
|
-
var price = _a[0], size = _a[1];
|
|
18
|
-
var sizePercentage = (size / maxSize) * 100;
|
|
19
|
-
return (_jsxs("div", { className: "grid grid-cols-3 gap-1 relative", children: [_jsx("div", { className: "text-left text-xs font-medium text-n1-ww-gray-900 dark:text-n1-ww-gray-100 font-mono z-10", children: size.toFixed(4) }), _jsx("div", { className: "text-center text-xs font-medium text-green-600 dark:text-green-400 font-mono z-10", children: price.toFixed(4) }), _jsx("div", { className: "text-right text-xs" }), _jsx("div", { className: "absolute top-0 left-0 h-full bg-green-100/50 dark:bg-green-900/10 z-0", style: { width: "".concat(sizePercentage, "%") } })] }, "bid-".concat(index)));
|
|
20
|
-
}) }), _jsxs("div", { className: "mt-2 text-[10px] text-n1-ww-gray-500 dark:text-n1-ww-gray-400 text-right", children: ["Last updated:", ' ', _jsx("span", { className: "font-mono", children: new Date(data.timestamp).toLocaleTimeString() })] })] }));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=OrderBookTable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OrderBookTable.js","sourceRoot":"","sources":["../../../../../src/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.tsx"],"names":[],"mappings":"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","sourcesContent":["import { RefreshCw } from 'lucide-react';\n\ninterface OrderBookTableProps {\n data: {\n bids: Array<[number, number]>;\n asks: Array<[number, number]>;\n timestamp: number;\n } | null;\n loading: boolean;\n maxSize: number;\n}\n\nexport default function OrderBookTable({\n data,\n loading,\n maxSize,\n}: OrderBookTableProps) {\n if (!data) {\n return (\n <div className=\"flex items-center justify-center h-40\">\n <p className=\"text-xs text-n1-ww-gray-500 dark:text-n1-ww-gray-400\">\n No orderbook data available\n </p>\n </div>\n );\n }\n\n // Limit the number of rows to display\n const maxRows = 8;\n const bids = data.bids.slice(0, maxRows);\n const asks = data.asks.slice(0, maxRows).reverse(); // Reverse to show highest ask at the bottom\n\n return (\n <div className=\"relative\">\n {loading && (\n <div className=\"absolute top-2 right-2 z-10\">\n <RefreshCw size={14} className=\"text-n1-ww-main n1-animate-spin\" />\n </div>\n )}\n\n <div className=\"grid grid-cols-3 gap-1 mb-1 text-[10px] text-n1-ww-gray-500 dark:text-n1-ww-gray-400 font-medium uppercase tracking-wider\">\n <div className=\"text-left\">Size</div>\n <div className=\"text-center\">Price</div>\n <div className=\"text-right\">Size</div>\n </div>\n\n {/* Asks (Sell orders) */}\n <div className=\"space-y-px mb-2\">\n {asks.map(([price, size], index) => {\n const sizePercentage = (size / maxSize) * 100;\n\n return (\n <div\n key={`ask-${index}`}\n className=\"grid grid-cols-3 gap-1 relative\"\n >\n <div className=\"text-left text-xs\"></div>\n <div className=\"text-center text-xs font-medium text-red-600 dark:text-red-400 font-mono z-10\">\n {price.toFixed(4)}\n </div>\n <div className=\"text-right text-xs font-medium text-n1-ww-gray-900 dark:text-n1-ww-gray-100 font-mono z-10\">\n {size.toFixed(4)}\n </div>\n <div\n className=\"absolute top-0 right-0 h-full bg-red-100/50 dark:bg-red-900/10 z-0\"\n style={{ width: `${sizePercentage}%` }}\n />\n </div>\n );\n })}\n </div>\n\n {/* Spread */}\n {bids.length > 0 && asks.length > 0 && (\n <div className=\"py-1 px-2 mb-2 border border-n1-ww-gray-200 dark:border-n1-ww-gray-800 rounded-sm text-center\">\n <span className=\"text-[10px] text-n1-ww-gray-500 dark:text-n1-ww-gray-400\">\n Spread:{' '}\n <span className=\"font-mono font-medium\">\n {(asks[asks.length - 1][0] - bids[0][0]).toFixed(4)}\n </span>{' '}\n (\n <span className=\"font-mono\">\n {((asks[asks.length - 1][0] / bids[0][0] - 1) * 100).toFixed(2)}%\n </span>\n )\n </span>\n </div>\n )}\n\n {/* Bids (Buy orders) */}\n <div className=\"space-y-px\">\n {bids.map(([price, size], index) => {\n const sizePercentage = (size / maxSize) * 100;\n\n return (\n <div\n key={`bid-${index}`}\n className=\"grid grid-cols-3 gap-1 relative\"\n >\n <div className=\"text-left text-xs font-medium text-n1-ww-gray-900 dark:text-n1-ww-gray-100 font-mono z-10\">\n {size.toFixed(4)}\n </div>\n <div className=\"text-center text-xs font-medium text-green-600 dark:text-green-400 font-mono z-10\">\n {price.toFixed(4)}\n </div>\n <div className=\"text-right text-xs\"></div>\n <div\n className=\"absolute top-0 left-0 h-full bg-green-100/50 dark:bg-green-900/10 z-0\"\n style={{ width: `${sizePercentage}%` }}\n />\n </div>\n );\n })}\n </div>\n\n {/* Last updated timestamp */}\n <div className=\"mt-2 text-[10px] text-n1-ww-gray-500 dark:text-n1-ww-gray-400 text-right\">\n Last updated:{' '}\n <span className=\"font-mono\">\n {new Date(data.timestamp).toLocaleTimeString()}\n </span>\n </div>\n </div>\n );\n}\n"]}
|