├── .env.example ├── .eslintignore ├── .eslintrc.js ├── .github ├── actions │ └── push_qa_repo │ │ └── action.yml ├── scripts │ └── set-env-from-pr-labels.sh └── workflows │ ├── pr.yml │ ├── pr_attach_build.yml │ ├── pr_push_qa.yml │ ├── release.yml │ ├── release_push_qa.yml │ └── run-tests.yml ├── .gitignore ├── .husky └── pre-commit ├── .parcelrc ├── .prettierrc ├── LICENSE ├── README.md ├── e2e ├── fixtures │ ├── components │ │ ├── erase-data-confirmation-dialog.ts │ │ └── verify-user.ts │ ├── constants.ts │ ├── pages │ │ ├── connect-ledger.ts │ │ ├── extension-page.ts │ │ ├── forgot-password.ts │ │ ├── get-started.ts │ │ ├── login.ts │ │ ├── manage-wallets │ │ │ ├── manage-wallets.ts │ │ │ └── wallet-group.ts │ │ ├── onboarding.ts │ │ ├── overview.ts │ │ └── settings.ts │ └── types.ts ├── tests │ ├── connect-ledger.spec.ts │ ├── forgot-password.spec.ts │ ├── get-started.spec.ts │ ├── login.spec.ts │ ├── manage-wallets.spec.ts │ ├── onboarding.spec.ts │ ├── overview.spec.ts │ ├── settings.spec.ts │ └── test.ts └── utils │ ├── wait.ts │ └── wallet.ts ├── jest.config.js ├── package-lock.json ├── package.json ├── physical-link.config.cjs ├── playwright.config.ts ├── scripts ├── build.js ├── execAsync.js ├── manifest-version.js ├── update-dev-manifest.js └── verifyDotEnv.cjs ├── src ├── _locales │ └── en │ │ └── messages.json ├── background │ ├── ContentScriptManager.ts │ ├── NotificationWindow │ │ ├── NotificationWindow.ts │ │ └── createBrowserWindow.ts │ ├── Wallet │ │ ├── GlobalPreferences.ts │ │ ├── Wallet.ts │ │ ├── WalletRecord.ts │ │ ├── helpers │ │ │ ├── mask.ts │ │ │ └── toEthersWallet.ts │ │ ├── model │ │ │ ├── AccountContainer.ts │ │ │ ├── ActivityRecord.ts │ │ │ ├── BareWallet.ts │ │ │ ├── SeedType.ts │ │ │ ├── SignerObject.ts │ │ │ ├── WalletContainer.ts │ │ │ ├── WalletNameFlag.ts │ │ │ ├── WalletOrigin.ts │ │ │ ├── ethers-v5-types.ts │ │ │ ├── types.ts │ │ │ └── versions.ts │ │ └── persistence.ts │ ├── account │ │ ├── Account.ts │ │ ├── Credentials.ts │ │ ├── account-helpers.client.ts │ │ └── storage-keys.ts │ ├── constants.mock.ts │ ├── constants.ts │ ├── events.ts │ ├── in-dapp-notifications.ts │ ├── index.ts │ ├── initialize.ts │ ├── messaging │ │ ├── HttpConnection.ts │ │ ├── PortContext.ts │ │ ├── PortRegistry.ts │ │ ├── controller-event-handlers │ │ │ ├── account-events-handler.ts │ │ │ └── ethereum-provider-events.ts │ │ ├── getPortContext.ts │ │ ├── mapRPCMessageToController.ts │ │ └── port-message-handlers │ │ │ ├── createHTTPConnectionMessageHandler.ts │ │ │ ├── createPortMessageHandler.ts │ │ │ ├── createWalletMessageHandler.ts │ │ │ └── notificationWindowMessageHandler.ts │ ├── requests │ │ └── liteweight-chain-support.ts │ ├── resource │ │ ├── memoryCacheRPC.ts │ │ └── sessionCacheService.ts │ ├── transactions │ │ ├── TransactionPoller.ts │ │ └── TransactionService.ts │ ├── uninstall.ts │ ├── user-activity.ts │ └── webapis │ │ ├── RuntimePort.ts │ │ └── storage.ts ├── content-script │ ├── competing-providers.ts │ ├── dapp-configs.ts │ ├── dapp-detection.ts │ ├── dapp-mutation.ts │ ├── eip6963.ts │ ├── in-dapp-notifications │ │ ├── close.svg │ │ ├── createNode.ts │ │ ├── index.ts │ │ ├── styles.module.css │ │ └── zerion-logo.svg │ ├── in-page.ts │ └── index.ts ├── env │ └── config.ts ├── images │ ├── logo-icon-128-disabled.png │ ├── logo-icon-128.png │ ├── logo-icon-16-disabled.png │ ├── logo-icon-16.png │ ├── logo-icon-32-disabled.png │ ├── logo-icon-32.png │ ├── logo-icon-48-disabled.png │ ├── logo-icon-48.png │ ├── logo-icon-dev-128.png │ ├── logo-icon-qa.png │ ├── logo-icon.png │ └── sample-avatar.png ├── manifest.json ├── modules │ ├── copy-to-clipboard.ts │ ├── crypto │ │ ├── aes.test.ts │ │ ├── aes.ts │ │ ├── aesStable.ts │ │ ├── convert.ts │ │ ├── getSHA256HexDigest.ts │ │ ├── index.ts │ │ ├── key.ts │ │ ├── random.ts │ │ └── types.ts │ ├── currency │ │ ├── currencies.ts │ │ └── useCurrency.ts │ ├── defi-sdk │ │ ├── BackgroundMemoryCache.ts │ │ ├── background.ts │ │ ├── defi-sdk-config.ts │ │ ├── index.ts │ │ ├── isTestClient.ts │ │ ├── queries.ts │ │ ├── registerTransaction.ts │ │ └── useDefiSdkClient.ts │ ├── detect-browser │ │ ├── detect-browser.test.ts │ │ ├── detect-browser.ts │ │ └── index.ts │ ├── dna-service │ │ ├── dna.background.ts │ │ ├── dna.client.ts │ │ └── types.ts │ ├── ethereum │ │ ├── abi │ │ │ └── allowance-abi.ts │ │ ├── account-abstraction │ │ │ ├── constants.ts │ │ │ ├── createTypedData.test.ts │ │ │ ├── createTypedData.ts │ │ │ ├── fetchAndAssignPaymaster.ts │ │ │ ├── rewards.ts │ │ │ └── zksync-patch.ts │ │ ├── chains │ │ │ ├── ChainConfigStore.ts │ │ │ ├── constants.ts │ │ │ ├── filterNetworkByQuery.ts │ │ │ ├── helpers.ts │ │ │ ├── requests.ts │ │ │ ├── types.ts │ │ │ └── versions.ts │ │ ├── connection.ts │ │ ├── constants.ts │ │ ├── eth_getBalance.ts │ │ ├── message-signing │ │ │ ├── TypedData.ts │ │ │ ├── prepareTypedData.ts │ │ │ ├── signTypedData.test.ts │ │ │ ├── signTypedData.ts │ │ │ └── toUtf8String.ts │ │ ├── provider.ts │ │ ├── requests │ │ │ └── getRpcProvider.ts │ │ ├── toChecksumAddress.test.ts │ │ ├── toChecksumAddress.ts │ │ ├── transactions │ │ │ ├── ChainId.ts │ │ │ ├── ChainIdValue.ts │ │ │ ├── actionAsset.ts │ │ │ ├── addressAction │ │ │ │ ├── addressActionMain.ts │ │ │ │ ├── creators.ts │ │ │ │ └── index.ts │ │ │ ├── appovals.ts │ │ │ ├── describeTransaction.ts │ │ │ ├── fetchAndAssignGasPrice.ts │ │ │ ├── gasPrices │ │ │ │ ├── EIP1559.ts │ │ │ │ ├── GasPriceObject.ts │ │ │ │ ├── assignGasPrice.ts │ │ │ │ ├── eip1559 │ │ │ │ │ └── estimateFee.ts │ │ │ │ ├── estimateNetworkFee.samples.ts │ │ │ │ ├── estimateNetworkFee.test.ts │ │ │ │ ├── estimateNetworkFee.ts │ │ │ │ ├── feeEstimation.ts │ │ │ │ ├── hasNetworkFee.ts │ │ │ │ ├── hexifyTxValues.ts │ │ │ │ ├── optimistic │ │ │ │ │ └── fee.ts │ │ │ │ ├── requests.ts │ │ │ │ └── types.ts │ │ │ ├── getBestKnownTransactionCount │ │ │ │ ├── backgroundGetBestKnownTransactionCount.ts │ │ │ │ └── uiGetBestKnownTransactionCount.ts │ │ │ ├── getChainId.ts │ │ │ ├── getGas.ts │ │ │ ├── getLatestKnownNonce.ts │ │ │ ├── getLatestNonceKnownByBackend.ts │ │ │ ├── getTransactionCount.ts │ │ │ ├── getTransactionObjectStatus.ts │ │ │ ├── interpret.ts │ │ │ ├── model.ts │ │ │ ├── normalizeTransactionChainId.ts │ │ │ ├── prepareTransaction.ts │ │ │ ├── removeSignature.ts │ │ │ ├── resolveChainId.ts │ │ │ ├── types.ts │ │ │ ├── useEstimateGas.ts │ │ │ └── wrappedGetNetworkById.ts │ │ └── types │ │ │ ├── AddEthereumChainParameter.ts │ │ │ ├── IncomingTransaction.ts │ │ │ └── TransactionResponsePlain.ts │ ├── fast-deep-equal │ │ └── index.ts │ ├── is-hotkey │ │ └── index.ts │ ├── name-service │ │ └── index.ts │ ├── networks │ │ ├── Chain.ts │ │ ├── NetworkConfig.ts │ │ ├── NetworkId.ts │ │ ├── NetworkSelectValue.ts │ │ ├── Networks.ts │ │ ├── asset.ts │ │ ├── errors.ts │ │ ├── helpers.ts │ │ ├── injectChainConfig.ts │ │ ├── networks-api.ts │ │ ├── networks-fallback.ts │ │ ├── networks-store.background.ts │ │ ├── networks-store.client.mock.ts │ │ ├── networks-store.client.ts │ │ ├── networks-store.ts │ │ └── useNetworks.ts │ ├── persistent-store.ts │ ├── phishing-defence │ │ └── phishing-defence-service.ts │ ├── query-client │ │ └── query-client.background.ts │ ├── remote-config │ │ ├── ConfigPlugin.ts │ │ ├── index.ts │ │ ├── pluginSystem.ts │ │ ├── plugins │ │ │ ├── firebase.ts │ │ │ └── useFirebaseConfig.ts │ │ ├── types.ts │ │ └── useRemoteConfigValue.ts │ ├── request-cache │ │ ├── request-cache.test.ts │ │ └── request-cache.ts │ ├── shared │ │ └── transactions │ │ │ └── helpers.ts │ ├── solana │ │ ├── SolTransaction.ts │ │ ├── icon.ts │ │ ├── keypairs.ts │ │ ├── shared.ts │ │ ├── signing.test.ts │ │ ├── signing.ts │ │ ├── transactions │ │ │ ├── SolTransactionResponse.ts │ │ │ ├── create.ts │ │ │ ├── parseSolanaTransaction.test.ts │ │ │ └── parseSolanaTransaction.ts │ │ └── zerion-solana.ts │ └── zerion-api │ │ ├── getHttpClientSource.ts │ │ ├── hooks │ │ ├── useAssetChart.ts │ │ ├── useAssetFullInfo.ts │ │ ├── useHttpClientSource.ts │ │ ├── useWalletAssetDetails.ts │ │ ├── useWalletAssetPnl.ts │ │ ├── useWalletPortfolio.ts │ │ └── useWalletPositions.ts │ │ ├── requests │ │ ├── ResponseBody.ts │ │ ├── asset-get-chart.ts │ │ ├── asset-get-fungible-full-info.ts │ │ ├── asset-get-fungible-pnl.ts │ │ ├── check-referral.ts │ │ ├── claim-retro.ts │ │ ├── get-gas-prices.ts │ │ ├── paymaster-transactions.ts │ │ ├── refer-wallet.ts │ │ ├── register-chain.ts │ │ ├── register-wallets.ts │ │ ├── security-check-url.ts │ │ ├── shared.background.ts │ │ ├── shared.client.ts │ │ ├── wallet-get-asset-details.ts │ │ ├── wallet-get-meta.ts │ │ ├── wallet-get-portfolio.ts │ │ └── wallet-get-positions.ts │ │ ├── shared.ts │ │ ├── types │ │ ├── Fungible.ts │ │ └── NetworkFeeType.ts │ │ ├── zerion-api-bare.ts │ │ ├── zerion-api.background.ts │ │ └── zerion-api.client.ts ├── shared │ ├── Disposable.ts │ ├── PortMessageChannel.ts │ ├── SeedType.ts │ ├── UrlContext.ts │ ├── WalletOrigin.ts │ ├── analytics │ │ ├── analytics.background.ts │ │ ├── analytics.client.ts │ │ ├── analytics.ts │ │ ├── api-v4-zerion.ts │ │ ├── google-analytics.ts │ │ ├── mixpanel.ts │ │ ├── platform.ts │ │ └── shared │ │ │ ├── DeviceIdStore.ts │ │ │ ├── UserLifecycle.ts │ │ │ ├── addressActionToAnalytics.ts │ │ │ ├── getProviderNameFromGroup.ts │ │ │ ├── getTotalWalletsBalance.ts │ │ │ ├── mixpanel-data-helpers.ts │ │ │ └── omitNullParams.ts │ ├── array-mutations.ts │ ├── assert-property.ts │ ├── core │ │ ├── BackgroundScriptUpdateHandler.ts │ │ ├── isClassProperty.test.ts │ │ ├── isClassProperty.ts │ │ ├── runtime-store.ts │ │ └── version │ │ │ ├── shared.ts │ │ │ ├── version.background.ts │ │ │ └── version.client.ts │ ├── createUrl.test.ts │ ├── createUrl.ts │ ├── custom-rpc │ │ ├── formatJsonRpcRequestPatched.ts │ │ ├── getPayloadId.ts │ │ ├── index.ts │ │ └── rpc-request.ts │ ├── dapps │ │ ├── dapps-list.data.ts │ │ ├── index.ts │ │ └── known-dapps.ts │ ├── difference.ts │ ├── errors │ │ ├── errors.ts │ │ ├── getError.ts │ │ ├── getEthersError.ts │ │ └── toEnumerableError.ts │ ├── formatJsonRpcResultForPort.ts │ ├── formatJsonRpcWalletError.ts │ ├── getCurrentUser.ts │ ├── getPopupUrl.ts │ ├── invariant.ts │ ├── isEmail.ts │ ├── isEthereumAddress.ts │ ├── isNumeric.ts │ ├── isObj.ts │ ├── logger │ │ └── index.ts │ ├── normalizeAddress.ts │ ├── normalizeChainId.test.ts │ ├── normalizeChainId.ts │ ├── openOnboarding.ts │ ├── packageVersion.ts │ ├── preferences-helpers.ts │ ├── rejectAfterDelay.ts │ ├── removeEmptyValues.ts │ ├── setUrlContext.ts │ ├── sidepanel │ │ ├── BrowserState.ts │ │ ├── SidepanelOptionsButton │ │ │ ├── SidepanelOptionsButton.tsx │ │ │ └── index.ts │ │ ├── initialize.background.ts │ │ ├── initialize.client.ts │ │ ├── sidepanel-apis.ts │ │ ├── sidepanel-commands.background.ts │ │ ├── sidepanel-messaging.background.ts │ │ ├── sidepanel-messaging.client.ts │ │ ├── sidepanel-support.ts │ │ └── types.ts │ ├── type-utils │ │ ├── Brand.ts │ │ ├── OneOf.ts │ │ ├── Opaque.ts │ │ ├── PartiallyOptional.ts │ │ ├── PartiallyRequired.ts │ │ └── versions.ts │ ├── types │ │ ├── AccountPublicRPC.ts │ │ ├── BareAddressPosition.ts │ │ ├── BareWallet.ts │ │ ├── ChannelContext.ts │ │ ├── Daylight.ts │ │ ├── Device.ts │ │ ├── ExternallyOwnedAccount.ts │ │ ├── GlobalPreferences.ts │ │ ├── InDappNotification.ts │ │ ├── MemoryCacheRPC.ts │ │ ├── MultichainTransaction.ts │ │ ├── Permission.ts │ │ ├── Quote.ts │ │ ├── SignTransactionResult.ts │ │ ├── SignatureContextParams.ts │ │ ├── StringBase64.ts │ │ ├── UrlContext.ts │ │ ├── User.ts │ │ ├── Wallet.ts │ │ ├── WalletContainer.ts │ │ ├── WalletGroup.ts │ │ ├── WalletNameFlag.ts │ │ ├── WalletRecord.ts │ │ ├── button-events.ts │ │ └── validators.ts │ ├── units │ │ ├── convert.test.ts │ │ ├── convert.ts │ │ ├── formatCurrencyValue │ │ │ ├── formatCurrencyValue.test.ts │ │ │ ├── formatCurrencyValue.ts │ │ │ ├── formatCurrencyValueExtra.test.ts │ │ │ ├── formatCurrencyValueExtra.ts │ │ │ └── index.ts │ │ ├── formatGasPrice.ts │ │ ├── formatPercent.ts │ │ ├── formatPriceValue.ts │ │ ├── formatSeconds.ts │ │ ├── formatTokenValue.test.ts │ │ ├── formatTokenValue.ts │ │ ├── startOfDate.ts │ │ ├── toNumber.ts │ │ └── valueToHex.ts │ ├── upsert.ts │ ├── validation │ │ ├── ValidationResult.ts │ │ ├── password-strength.test.ts │ │ ├── password-strength.ts │ │ ├── user-input.ts │ │ └── wallet.ts │ ├── wait.ts │ └── wallet │ │ ├── classifiers.ts │ │ ├── create.ts │ │ ├── derivation-paths.ts │ │ ├── encode-locally.test.ts │ │ ├── encode-locally.ts │ │ ├── encryption.ts │ │ └── shared.ts ├── temporary.d.ts ├── ui-lab │ ├── App.tsx │ ├── README.md │ ├── components │ │ └── WindowSize │ │ │ ├── WindowSize.tsx │ │ │ └── index.ts │ ├── defi-sdk │ │ └── index.ts │ ├── index.html │ ├── lab.module.css │ ├── parcel.lab.config │ ├── readmes │ │ ├── Crypto.readme.tsx │ │ └── index.ts │ ├── types │ │ └── index.ts │ └── webextension-polyfill.mock.ts └── ui │ ├── App │ ├── App.tsx │ ├── RouteRestoration.ts │ └── index.ts │ ├── DNA │ ├── assets │ │ ├── close-tab.svg │ │ ├── exclusive.svg │ │ └── tab.svg │ ├── components │ │ ├── DnaBanners.tsx │ │ ├── MintBanner.tsx │ │ ├── UpgradeBanner.tsx │ │ └── styles.module.css │ ├── pages │ │ ├── MintDnaFlow │ │ │ ├── MintDna.tsx │ │ │ ├── MintDnaFlow.tsx │ │ │ ├── MintDnaWaiting.tsx │ │ │ ├── Success.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ └── UpgradeDnaFlow │ │ │ ├── SelectBackground.tsx │ │ │ ├── SelectDna.tsx │ │ │ ├── Success.tsx │ │ │ ├── UpgradeDnaFlow.tsx │ │ │ ├── UpgradeDnaWaiting.tsx │ │ │ ├── index.ts │ │ │ ├── styles.module.css │ │ │ └── values.ts │ └── shared │ │ ├── DnaBanner.tsx │ │ ├── Step.tsx │ │ ├── WideScreen.tsx │ │ ├── constants.ts │ │ ├── styles.module.css │ │ └── useShowDnaBanner.ts │ ├── Onboarding │ └── shared │ │ └── usePendingRecoveryPhrase.ts │ ├── assets │ ├── account.svg │ ├── actionTypes │ │ ├── approve.svg │ │ ├── borrow.svg │ │ ├── burn.svg │ │ ├── cancel.svg │ │ ├── claim.svg │ │ ├── contract.svg │ │ ├── deployment.svg │ │ ├── deposit.svg │ │ ├── mint.svg │ │ ├── receive.svg │ │ ├── repay.svg │ │ ├── revoke.svg │ │ ├── send.svg │ │ ├── stake.svg │ │ ├── swap.svg │ │ ├── unknown.svg │ │ ├── unstake.svg │ │ └── withdraw.svg │ ├── actions │ │ ├── bridge.svg │ │ ├── buy.svg │ │ ├── receive.svg │ │ ├── send.svg │ │ └── swap.svg │ ├── add-circle-outlined.svg │ ├── all-networks.svg │ ├── arrow-down.svg │ ├── arrow-left-top.svg │ ├── arrow-left.svg │ ├── arrow-right.svg │ ├── background-arts-2.svg │ ├── background-arts.svg │ ├── bug.svg │ ├── bulb.svg │ ├── cancel-emoji.png │ ├── cancel-emoji@2x.png │ ├── cancel.svg │ ├── caret-down-filled.svg │ ├── caret-right.svg │ ├── changed-assets-2.svg │ ├── changed-assets-3.svg │ ├── changed-assets-more.svg │ ├── chart-promo.svg │ ├── check-circle-thin-gradient.svg │ ├── check-circle-thin.svg │ ├── check.svg │ ├── check_double.svg │ ├── checkmark-allowed.svg │ ├── checkmark-checked.svg │ ├── checkmark-denied.svg │ ├── checkmark-unchecked.svg │ ├── chevron-down.svg │ ├── chevron-left-medium.svg │ ├── chevron-right.svg │ ├── clear-solid.svg │ ├── close.svg │ ├── coming-soon@2x.png │ ├── connect.svg │ ├── connection-toggle-off.svg │ ├── connection-toggle-on.svg │ ├── contract-execution.svg │ ├── copy.svg │ ├── csv-promo.svg │ ├── dark-mode-lamp.svg │ ├── dexscreener-logo.svg │ ├── disconnect.svg │ ├── dots.svg │ ├── download.svg │ ├── drop.svg │ ├── ecosystem-ethereum.svg │ ├── ecosystem-solana.svg │ ├── edit.svg │ ├── experimental.svg │ ├── eye.svg │ ├── failed.svg │ ├── filters-24.svg │ ├── filters.svg │ ├── flag.svg │ ├── gas.svg │ ├── gift-solid.svg │ ├── gift.svg │ ├── globe.svg │ ├── hammer.svg │ ├── infinity.svg │ ├── info-icon-trimmed.svg │ ├── info.svg │ ├── invisible.svg │ ├── invite.svg │ ├── ledger-icon-small.svg │ ├── ledger-icon.svg │ ├── lock-outline.svg │ ├── lock.png │ ├── metamask.svg │ ├── metamask_disabled.svg │ ├── network.svg │ ├── new-window.svg │ ├── no-results@2x.png │ ├── pause-feature-off.svg │ ├── pause-feature-on.svg │ ├── person.svg │ ├── pie-chart.svg │ ├── plus.svg │ ├── popup.svg │ ├── portfolio.svg │ ├── premium.svg │ ├── qr-code.svg │ ├── question-hint.svg │ ├── reduced-fees-promo.svg │ ├── reverse.svg │ ├── rewards.svg │ ├── rocket-outline.svg │ ├── rocket.png │ ├── rocket@2x.png │ ├── scroll.svg │ ├── search.svg │ ├── security.svg │ ├── settings-sliders.svg │ ├── settings.svg │ ├── share.svg │ ├── shield-filled.svg │ ├── shield-warning.svg │ ├── shield.svg │ ├── sidepanel.svg │ ├── sign-in.svg │ ├── signature.svg │ ├── solana.svg │ ├── success_background.png │ ├── sync.svg │ ├── system-avatar-dark.svg │ ├── system-avatar-light.svg │ ├── technology-connect.svg │ ├── trash.svg │ ├── validation-error.svg │ ├── verified.svg │ ├── visible.svg │ ├── wallet-fancy.svg │ ├── wallet.svg │ ├── warning-icon-trimmed.svg │ ├── warning-triangle.svg │ ├── warning.svg │ ├── warpcast-logo.svg │ ├── watch-address.svg │ ├── x-logo.svg │ ├── xp.svg │ ├── zer_coin.png │ ├── zer_spark.png │ ├── zer_star.png │ ├── zerion-avatar@2x.png │ ├── zerion-full-logo.svg │ ├── zerion-logo-blue.svg │ ├── zerion-logo-monochrome.svg │ ├── zerion-logo-squircle-white.svg │ ├── zerion-logo-text.svg │ ├── zerion-logo.svg │ └── zerion-squircle.svg │ ├── components │ ├── Address │ │ ├── Address.tsx │ │ └── index.ts │ ├── AddressBadge │ │ ├── AddressBadge.tsx │ │ └── index.ts │ ├── AllowanceForm │ │ ├── AllowanceForm.tsx │ │ └── index.tsx │ ├── AllowanceView │ │ ├── AllowanceView.tsx │ │ └── index.ts │ ├── AngleRightRow │ │ ├── AngleRightRow.tsx │ │ └── index.ts │ ├── AnimatedAppear │ │ ├── AnimatedAppear.tsx │ │ └── index.ts │ ├── AssetIcon │ │ ├── AssetIcon.tsx │ │ └── index.ts │ ├── AssetLink │ │ ├── AssetLink.tsx │ │ └── index.ts │ ├── AssetQuantity │ │ ├── AssetQuantity.tsx │ │ └── index.ts │ ├── BackButton │ │ ├── BackButton.tsx │ │ └── index.ts │ ├── Background │ │ ├── Background.tsx │ │ └── index.ts │ ├── BackupInfoNote │ │ ├── BackupInfoNote.tsx │ │ └── index.ts │ ├── Badge │ │ ├── Badge.tsx │ │ ├── index.ts │ │ └── styles.module.css │ ├── BlockchainTitleHelper │ │ ├── BlockchainTitleHelper.tsx │ │ └── index.ts │ ├── BlockieImg │ │ ├── BlockieImg.tsx │ │ ├── generateSolanaBlockie.ts │ │ └── index.ts │ ├── BlurredToggle │ │ ├── BlurredToggle.tsx │ │ └── index.ts │ ├── BugReportButton │ │ ├── BugReportButton.tsx │ │ ├── getBugReportURL.ts │ │ ├── index.ts │ │ └── styles.module.css │ ├── CopyButton │ │ ├── CopyButton.tsx │ │ └── index.ts │ ├── DappIconFetcher │ │ ├── DappIconFetcher.tsx │ │ ├── index.ts │ │ └── useFetchDappIcon.ts │ ├── DelayedRender │ │ ├── DelayedRender.tsx │ │ └── index.ts │ ├── DesignTheme │ │ ├── DesignTheme.tsx │ │ ├── ThemeDecoration.tsx │ │ └── index.ts │ ├── EmptyView │ │ ├── EmptyView.tsx │ │ └── index.ts │ ├── EraseData │ │ ├── EraseDataConfirmationDialog.tsx │ │ ├── EraseDataInProgress.tsx │ │ ├── EraseDataListButton.tsx │ │ ├── index.ts │ │ └── useEraseDataMutation.ts │ ├── ErrorBoundary │ │ ├── ErrorBoundary.tsx │ │ └── index.ts │ ├── FiatInputValue │ │ ├── FiatInputValue.tsx │ │ └── index.ts │ ├── FillView │ │ ├── FillView.tsx │ │ ├── index.ts │ │ └── styles.module.css │ ├── GasbackDecorated │ │ ├── GasbackDecorated.tsx │ │ └── index.ts │ ├── GenericPrompt │ │ ├── GenericPrompt.tsx │ │ └── index.ts │ ├── GradientBorder │ │ ├── GradientBorder.tsx │ │ └── index.ts │ ├── HandshakeFailure │ │ ├── HandshakeFailure.tsx │ │ └── index.ts │ ├── KeyboardShortcut │ │ ├── KeyboardShortcut.tsx │ │ └── index.ts │ ├── NFTLink │ │ ├── NFTLink.tsx │ │ └── index.ts │ ├── NavigationBackButton │ │ ├── NavigationBackButton.tsx │ │ └── index.ts │ ├── NavigationBar │ │ ├── NavigationBar.tsx │ │ └── index.ts │ ├── NavigationTitle │ │ ├── NavigationTitle.tsx │ │ └── index.ts │ ├── NetworkIcon │ │ ├── NetworkIcon.tsx │ │ └── index.ts │ ├── NetworkResetButton │ │ ├── NetworkResetButton.tsx │ │ └── index.ts │ ├── NetworkSelectDialog │ │ ├── AddNetworkLink.tsx │ │ ├── NetworkSelectDialog.tsx │ │ ├── NetworksEmptyView.tsx │ │ ├── constants.ts │ │ ├── createNetworkGroups.ts │ │ ├── index.ts │ │ └── useSearchKeyboardNavigation.ts │ ├── NotFoundPage │ │ ├── NotFoundPage.tsx │ │ └── index.ts │ ├── PageBottom │ │ ├── PageBottom.tsx │ │ └── index.ts │ ├── PageColumn │ │ ├── PageColumn.tsx │ │ ├── index.ts │ │ └── styles.module.css │ ├── PageFullBleedColumn │ │ ├── PageFullBleedColumn.tsx │ │ └── index.ts │ ├── PageFullBleedLine │ │ ├── PageFullBleedLine.tsx │ │ └── index.ts │ ├── PageHeading │ │ ├── PageHeading.tsx │ │ └── index.ts │ ├── PageStickyFooter │ │ ├── PageStickyFooter.tsx │ │ └── index.ts │ ├── PageTop │ │ ├── PageTop.tsx │ │ └── index.ts │ ├── PauseInjection │ │ ├── PauseInjection.tsx │ │ ├── actions.ts │ │ └── index.ts │ ├── PhishingDefence │ │ ├── PhishingDefenceStatus.tsx │ │ ├── PhishingWarningPage.tsx │ │ ├── blockaid.svg │ │ └── usePhishingDefenceStatus.ts │ ├── PortalToRootNode │ │ ├── PortalToRootNode.tsx │ │ └── index.ts │ ├── Positions │ │ ├── groupPositions.ts │ │ ├── helpers.tsx │ │ └── types.ts │ ├── PrivacyFooter │ │ ├── PrivacyFooter.tsx │ │ └── index.ts │ ├── PseudoRoute │ │ ├── PseudoRoute.tsx │ │ └── index.ts │ ├── SecretInput │ │ ├── SecretInput.tsx │ │ └── index.ts │ ├── Session │ │ ├── InactivityDetector.tsx │ │ └── SessionResetHandler.tsx │ ├── ShuffleText │ │ ├── ShuffleText.tsx │ │ └── index.ts │ ├── SignMessageButton │ │ ├── SignMessageButton.tsx │ │ └── index.ts │ ├── SignTransactionButton │ │ ├── ReadonlyWarningDialog │ │ │ ├── ReadonlyWarningDialog.tsx │ │ │ └── index.ts │ │ ├── SignTransactionButton.tsx │ │ └── index.ts │ ├── SiteFaviconImg │ │ ├── SiteFaviconImg.tsx │ │ └── index.ts │ ├── SlidingRectangle │ │ ├── SlidingRectangle.tsx │ │ └── index.ts │ ├── Splash │ │ ├── Splash.tsx │ │ └── index.ts │ ├── TextPulse │ │ ├── TextPulse.tsx │ │ ├── index.ts │ │ └── styles.module.css │ ├── UIContext │ │ ├── UIContext.ts │ │ └── index.ts │ ├── URLBar │ │ ├── URLBar.tsx │ │ └── index.ts │ ├── VerifyUser │ │ ├── VerifyUser.tsx │ │ ├── WithPasswordSession.tsx │ │ └── index.ts │ ├── VersionUpgrade │ │ ├── VersionUpgrade.tsx │ │ └── index.ts │ ├── ViewArea │ │ ├── ViewArea.tsx │ │ └── index.ts │ ├── ViewError │ │ ├── ViewError.tsx │ │ └── index.ts │ ├── ViewLoading │ │ ├── ViewLoading.tsx │ │ └── index.ts │ ├── ViewSuspense │ │ ├── ViewSuspense.tsx │ │ └── index.ts │ ├── WalletAvatar │ │ ├── AvatarIcon │ │ │ ├── AvatarIcon.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── WalletAvatar.tsx │ │ └── index.ts │ ├── WalletDisplayName │ │ ├── WalletDisplayName.tsx │ │ └── index.ts │ ├── WalletMedia │ │ ├── WalletMedia.tsx │ │ └── index.ts │ ├── WalletSourceIcon │ │ ├── WalletSourceIcon.tsx │ │ └── index.ts │ ├── WarningIcon │ │ ├── WarningIcon.tsx │ │ └── index.ts │ ├── address-action │ │ ├── AddressActionDetails │ │ │ ├── AddressActionDetails.tsx │ │ │ └── index.ts │ │ ├── ApplicationLine │ │ │ ├── ApplicationLine.tsx │ │ │ └── index.ts │ │ ├── EligibilityQuery.ts │ │ ├── RecipientLine │ │ │ ├── RecipientLine.tsx │ │ │ └── index.ts │ │ ├── SingleAsset │ │ │ ├── SingleAsset.tsx │ │ │ └── index.ts │ │ ├── TextLine │ │ │ ├── TextLine.tsx │ │ │ └── index.ts │ │ ├── TransactionConfirmationView │ │ │ ├── TransactionConfirmationView.tsx │ │ │ └── index.ts │ │ ├── TransactionSimulation │ │ │ ├── TransactionSimulation.tsx │ │ │ └── index.ts │ │ └── Transfers │ │ │ ├── Transfers.tsx │ │ │ └── index.ts │ ├── chart │ │ ├── Chart.tsx │ │ ├── config.ts │ │ ├── helpers.ts │ │ ├── plugins.ts │ │ └── types.ts │ ├── useToggledValues.ts │ └── useTransformTrigger.ts │ ├── features │ ├── appearance │ │ ├── AppearancePage │ │ │ ├── AppearancePage.tsx │ │ │ └── index.ts │ │ ├── Theme.ts │ │ ├── ThemeState.ts │ │ ├── ThemeStore.ts │ │ ├── applyTheme.ts │ │ ├── index.ts │ │ ├── persistence.ts │ │ ├── preference-store.ts │ │ └── theme-store.ts │ ├── onboarding │ │ ├── Backup │ │ │ ├── Backup.tsx │ │ │ └── index.ts │ │ ├── CreateUser │ │ │ ├── CreateUser.tsx │ │ │ └── index.ts │ │ ├── FAQ │ │ │ ├── FAQ.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── Hardware │ │ │ ├── Hardware.tsx │ │ │ ├── hardwareSearchParams.ts │ │ │ └── index.ts │ │ ├── Import │ │ │ ├── Import.tsx │ │ │ ├── ImportKey.tsx │ │ │ ├── ImportMnemonic.tsx │ │ │ ├── ImportSearchParams.ts │ │ │ ├── Input.tsx │ │ │ ├── SecurityInfo.tsx │ │ │ ├── SelectWallets.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── Onboarding.tsx │ │ ├── Password │ │ │ ├── Password.tsx │ │ │ ├── index.ts │ │ │ └── passwordSearchParams.ts │ │ ├── Success │ │ │ ├── CongratulationsWidget │ │ │ │ ├── CongratulationsWidget.tsx │ │ │ │ ├── index.ts │ │ │ │ └── styles.module.css │ │ │ ├── ReferralCodeWidget │ │ │ │ ├── ReferralCodeWidget.tsx │ │ │ │ ├── index.ts │ │ │ │ └── styles.module.css │ │ │ ├── Success.tsx │ │ │ ├── assets │ │ │ │ ├── jigsaw.svg │ │ │ │ ├── pin.svg │ │ │ │ └── zerion.svg │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── Welcome │ │ │ ├── Welcome.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── assets │ │ │ ├── dialog.png │ │ │ ├── key.png │ │ │ ├── metamask.png │ │ │ ├── option_create.png │ │ │ ├── option_hardware.png │ │ │ ├── option_import.png │ │ │ ├── option_secondary_create.svg │ │ │ ├── option_secondary_hardware.svg │ │ │ ├── option_secondary_import.svg │ │ │ ├── phantom-wallet-icon.svg │ │ │ ├── session-expired.png │ │ │ ├── wallet.png │ │ │ ├── wallet2.png │ │ │ └── welcome_background.png │ │ ├── errors.ts │ │ ├── index.ts │ │ ├── initialization.ts │ │ └── shared │ │ │ ├── PageLayout │ │ │ ├── PageLayout.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ │ ├── SessionExpired.tsx │ │ │ ├── SidePanel │ │ │ ├── SidePanel.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ │ ├── helperStyles.module.css │ │ │ └── useOnboardingSession.ts │ ├── preferences │ │ ├── index.ts │ │ └── usePreferences.ts │ ├── referral-program │ │ ├── EnterReferralCodeDialog │ │ │ ├── EnterReferralCodeDialog.tsx │ │ │ └── index.ts │ │ ├── Invite.tsx │ │ ├── InviteFriendsBanner │ │ │ ├── InviteFriendsBanner.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── InviteLinkDialog │ │ │ ├── InviteLinkDialog.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── QRCodeDialog │ │ │ ├── QRCodeDialog.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── ReferralLinkDialog │ │ │ ├── ReferralLinkDialog.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── ReferralProgramService.background.ts │ │ ├── SuccessDialog │ │ │ ├── SuccessDialog.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── WebAppMessageHandler.tsx │ │ ├── index.ts │ │ ├── shared │ │ │ ├── Circle │ │ │ │ ├── Circle.tsx │ │ │ │ ├── index.ts │ │ │ │ └── styles.module.css │ │ │ ├── FeatureCard │ │ │ │ ├── FeatureCard.tsx │ │ │ │ ├── index.ts │ │ │ │ └── styles.module.css │ │ │ ├── PremiumTrialBanner │ │ │ │ ├── PremiumTrialBanner.tsx │ │ │ │ ├── index.ts │ │ │ │ └── styles.module.css │ │ │ ├── ReferrerLink │ │ │ │ ├── ReferrerLink.tsx │ │ │ │ └── index.ts │ │ │ ├── UnorderedListItem │ │ │ │ ├── UnorderedListItem.tsx │ │ │ │ └── index.ts │ │ │ └── storage.ts │ │ └── styles.module.css │ ├── testnet-mode │ │ ├── DisableTestnetShortcuts │ │ │ ├── DisableTestnetShortcuts.tsx │ │ │ └── index.ts │ │ ├── MainnetOnlyWarningDialog │ │ │ ├── MainnetOnlyWarningDialog.tsx │ │ │ └── index.ts │ │ ├── TestModeDecoration │ │ │ ├── TestModeDecoration.tsx │ │ │ └── index.ts │ │ └── store.ts │ ├── turnstile │ │ ├── Turnstile.tsx │ │ ├── events.ts │ │ ├── helpers.ts │ │ └── index.ts │ └── xp-drop │ │ ├── XpDrop.tsx │ │ ├── XpDropClaimFlow │ │ ├── XpDropClaim.tsx │ │ ├── XpDropClaimFlow.tsx │ │ ├── XpDropClaimSuccess.tsx │ │ ├── index.ts │ │ └── styles.module.css │ │ ├── XpDropOnboarding │ │ ├── XpDropOnboarding.tsx │ │ ├── XpDropScoring.tsx │ │ ├── index.ts │ │ └── styles.module.css │ │ ├── components │ │ └── XpDropBanner │ │ │ ├── XpDropBanner.tsx │ │ │ └── index.ts │ │ └── index.ts │ ├── global.d.ts │ ├── hardware-wallet │ ├── ConnectLedgerDevice │ │ ├── ConnectIllustration │ │ │ ├── ConnectIllustration.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── ConnectLedgerDevice.tsx │ │ └── index.ts │ ├── ImportLedgerAddresses │ │ ├── ImportLedgerAddresses.tsx │ │ └── index.ts │ ├── LedgerIframe │ │ ├── LedgerIframe.tsx │ │ └── index.ts │ ├── SignConnector │ │ ├── SignConnector.tsx │ │ ├── helpers.ts │ │ └── index.ts │ ├── assets │ │ ├── ledger-body.svg │ │ ├── ledger-screen-text.svg │ │ └── ledger-wire.svg │ ├── ledger.html │ ├── ledger.tsx │ ├── shared │ │ ├── errors.ts │ │ └── verifySandbox.ts │ └── types.ts │ ├── index.html │ ├── index.tsx │ ├── pages │ ├── AddEthereumChain │ │ ├── AddEthereumChain.tsx │ │ ├── RpcUrlForm │ │ │ ├── RpcUrlForm.tsx │ │ │ └── index.ts │ │ ├── RpcUrlHelp │ │ │ ├── RpcUrlHelp.tsx │ │ │ └── index.ts │ │ └── index.ts │ ├── AssetInfo │ │ ├── AssetAddressDetails.tsx │ │ ├── AssetChart │ │ │ ├── AssetChart.tsx │ │ │ ├── helpers.ts │ │ │ ├── interaction.ts │ │ │ ├── plugins.ts │ │ │ ├── tooltip.ts │ │ │ └── types.ts │ │ ├── AssetDescription.tsx │ │ ├── AssetGlobalStats.tsx │ │ ├── AssetHeader.tsx │ │ ├── AssetHistory.tsx │ │ ├── AssetInfo.tsx │ │ ├── AssetResources.tsx │ │ ├── AssetTitleAndChart.tsx │ │ ├── helpers.ts │ │ ├── index.ts │ │ └── styles.module.css │ ├── Backup │ │ ├── Backup.tsx │ │ ├── Info │ │ │ ├── Info.tsx │ │ │ ├── create_card_1.png │ │ │ ├── create_card_2.png │ │ │ ├── create_card_3.png │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── RecoveryPhrase.tsx │ │ ├── Success │ │ │ ├── Success.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── VerifyBackup.tsx │ │ ├── VerifyUser │ │ │ ├── VerifyUser.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── clipboardWarning.ts │ │ ├── index.ts │ │ └── useRecoveryPhrase.ts │ ├── BridgeForm │ │ ├── BridgeForm.tsx │ │ ├── BridgeLine │ │ │ ├── BridgeLine.tsx │ │ │ └── index.ts │ │ ├── LabeledNetworkSelect │ │ │ ├── LabeledNetworkSelect.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── QuoteList │ │ │ ├── QuoteList.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── ReceiverAddressField │ │ │ ├── ReceiverAddressField.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── ReverseButton │ │ │ ├── ReverseButton.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── SuccessState │ │ │ ├── SuccessState.tsx │ │ │ └── index.ts │ │ ├── ZerionFeeLine │ │ │ ├── ZerionFeeLine.tsx │ │ │ └── index.ts │ │ ├── fieldsets │ │ │ ├── ReceiveTokenField │ │ │ │ ├── ReceiveTokenField.tsx │ │ │ │ └── index.ts │ │ │ └── SpendTokenField │ │ │ │ ├── SpendTokenField.tsx │ │ │ │ └── index.ts │ │ ├── index.ts │ │ └── types.ts │ ├── ConnectedSites │ │ ├── ConnectedSite │ │ │ ├── ConnectedSite.tsx │ │ │ ├── ConnectedSiteDialog.tsx │ │ │ ├── DisconnectFromDappButton │ │ │ │ ├── DisconnectFromDappButton.tsx │ │ │ │ └── index.ts │ │ │ ├── MetamaskMode.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── ConnectedSites.tsx │ │ ├── index.ts │ │ └── shared │ │ │ ├── getConnectedSite.ts │ │ │ ├── isConnectableDapp.ts │ │ │ └── useRemovePermission.ts │ ├── CreateAccount │ │ ├── CreateAccount.tsx │ │ ├── StrengthChecks │ │ │ ├── StrengthChecks.tsx │ │ │ └── index.ts │ │ ├── StrengthIndicator │ │ │ ├── StrengthIndicator.tsx │ │ │ └── index.ts │ │ └── index.ts │ ├── Feed │ │ ├── Ability │ │ │ ├── Ability.tsx │ │ │ ├── AbilityMenu.tsx │ │ │ ├── AbilityPage.tsx │ │ │ └── index.ts │ │ ├── Feed.tsx │ │ ├── Loader.tsx │ │ ├── daylight.ts │ │ ├── index.ts │ │ ├── stored.ts │ │ └── styles.module.css │ ├── ForgotPassword │ │ ├── ForgotPassword.tsx │ │ ├── index.ts │ │ └── styles.module.css │ ├── GetStarted │ │ ├── AddReadonlyAddress │ │ │ ├── AddReadonlyAddress.tsx │ │ │ └── index.ts │ │ ├── GenerateWallet │ │ │ ├── GenerateWallet.tsx │ │ │ └── index.ts │ │ ├── GetStarted.tsx │ │ ├── ImportWallet │ │ │ ├── ImportWallet.tsx │ │ │ ├── MnemonicImportView │ │ │ │ ├── AddressImportFlow │ │ │ │ │ ├── AddressImportFlow.tsx │ │ │ │ │ ├── AddressImportMessages │ │ │ │ │ │ ├── AddressImportMessages.tsx │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── WalletList │ │ │ │ │ │ ├── WalletList.tsx │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── MnemonicImportView.tsx │ │ │ │ ├── getFirstNMnemonicWallets.ts │ │ │ │ ├── getFirstNMnemonicWallets.worker.ts │ │ │ │ ├── helpers.ts │ │ │ │ └── index.ts │ │ │ ├── PrivateKeyImportView │ │ │ │ ├── PrivateKeyImportView.tsx │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── memoryLocationState.ts │ │ ├── components │ │ │ ├── TitleWithLine │ │ │ │ ├── TitleWithLine.tsx │ │ │ │ └── index.ts │ │ │ └── importDecoration │ │ │ │ ├── ImportDecoration.tsx │ │ │ │ ├── WithConfetti.tsx │ │ │ │ └── styles.module.css │ │ └── index.ts │ ├── HardwareWalletConnection │ │ ├── HardwareSignMessage │ │ │ ├── HardwareSignMessage.tsx │ │ │ └── index.ts │ │ ├── HardwareSignTransaction │ │ │ ├── HardwareSignTransaction.tsx │ │ │ └── index.ts │ │ ├── HardwareWalletConnection.tsx │ │ ├── ImportSuccess │ │ │ ├── ImportSuccess.tsx │ │ │ └── index.ts │ │ ├── index.ts │ │ └── shared │ │ │ ├── getWalletInfo.ts │ │ │ ├── isAllowedMessage.ts │ │ │ └── messageHandler.ts │ ├── History │ │ ├── AccelerateTransactionDialog │ │ │ ├── AccelerateTransactionDialog.tsx │ │ │ ├── CancelTx │ │ │ │ ├── CancelTx.tsx │ │ │ │ └── index.ts │ │ │ ├── SpeedUp │ │ │ │ ├── SpeedUp.tsx │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── shared │ │ │ │ ├── accelerate-helpers.test.ts │ │ │ │ └── accelerate-helpers.ts │ │ ├── ActionDetailedView │ │ │ ├── ActionDetailedView.tsx │ │ │ ├── components │ │ │ │ ├── CollectionLine.tsx │ │ │ │ ├── ExplorerInfo.tsx │ │ │ │ ├── FeeLine.tsx │ │ │ │ ├── RateLine.tsx │ │ │ │ ├── SenderReceiverLine.tsx │ │ │ │ └── TransferInfo.tsx │ │ │ └── index.ts │ │ ├── ActionItem │ │ │ ├── ActionItem.tsx │ │ │ ├── TransactionItemValue.tsx │ │ │ ├── TransactionTypeIcon.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── ActionSearch.tsx │ │ ├── ActionsList │ │ │ ├── ActionsList.tsx │ │ │ └── index.ts │ │ ├── History.tsx │ │ ├── index.ts │ │ ├── isUnlimitedApproval.ts │ │ └── matchSearcQuery.ts │ ├── Intro │ │ ├── Intro.tsx │ │ └── index.ts │ ├── Login │ │ ├── LayersAnimationLottie.tsx │ │ ├── Login.tsx │ │ ├── index.ts │ │ └── login-animation-lottie.json │ ├── ManageWallets │ │ ├── ManageWallets.tsx │ │ ├── WalletAccount │ │ │ ├── WalletAccount.tsx │ │ │ └── index.ts │ │ ├── WalletGroup │ │ │ ├── WalletGroup.tsx │ │ │ └── index.ts │ │ ├── index.ts │ │ └── shared │ │ │ └── groupByEcosystem.ts │ ├── Networks │ │ ├── NetworkCreateSuccess │ │ │ ├── NetworkCreateSuccess.tsx │ │ │ └── index.ts │ │ ├── NetworkForm │ │ │ ├── NetworkForm.tsx │ │ │ └── index.ts │ │ ├── NetworkSelect │ │ │ ├── NetworkSelect.tsx │ │ │ └── index.ts │ │ ├── NetworkUpdateSuccess │ │ │ ├── NetworkUpdateSuccess.tsx │ │ │ └── index.ts │ │ ├── Networks.tsx │ │ ├── README.md │ │ ├── index.ts │ │ └── shared │ │ │ ├── NetworkList │ │ │ ├── NetworkList.tsx │ │ │ └── index.ts │ │ │ ├── SearchResults │ │ │ ├── SearchResults.tsx │ │ │ └── index.ts │ │ │ ├── ValueCell │ │ │ ├── ValueCell.tsx │ │ │ └── index.ts │ │ │ ├── createEmptyChainConfig.ts │ │ │ └── useWalletAddresses.ts │ ├── NonFungibleToken │ │ ├── NonFungibleToken.tsx │ │ ├── getEntityUrl.ts │ │ ├── index.ts │ │ └── useAddressNftPosition.ts │ ├── Overview │ │ ├── ActionButtonsRow │ │ │ ├── ActionButtonsRow.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── BackupReminder.tsx │ │ ├── Banners │ │ │ ├── Banners.tsx │ │ │ ├── SolanaBanner.tsx │ │ │ └── index.ts │ │ ├── ConnectionHeader │ │ │ ├── ConnectionHeader.tsx │ │ │ └── index.ts │ │ ├── NonFungibleTokens │ │ │ ├── NonFungibleTokens.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── Overview.readme.tsx │ │ ├── Overview.tsx │ │ ├── Positions │ │ │ ├── DappLink.tsx │ │ │ ├── EmptyPositionsView.tsx │ │ │ ├── NetworkBalance.tsx │ │ │ ├── Positions.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── getTabsOffset.ts │ │ └── index.ts │ ├── Receive │ │ ├── AddressDetails.tsx │ │ ├── Receive.tsx │ │ └── index.ts │ ├── RequestAccounts │ │ ├── ChooseGlobalProvider │ │ │ ├── ChooseGlobalProvider.tsx │ │ │ └── index.ts │ │ ├── RequestAccounts.readme.tsx │ │ ├── RequestAccounts.tsx │ │ └── index.ts │ ├── RevealPrivateKey │ │ ├── RevealPrivateKey.tsx │ │ ├── index.ts │ │ └── usePrivateKey.ts │ ├── RouteResolver │ │ ├── RouteResolver.tsx │ │ └── index.ts │ ├── Security │ │ ├── AutoLockTimer.tsx │ │ ├── Security.tsx │ │ └── index.ts │ ├── SendForm │ │ ├── AssetSelect │ │ │ ├── AssetSelect.tsx │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── SendForm.tsx │ │ ├── SendTransactionConfirmation │ │ │ ├── SendTransactionConfirmation.tsx │ │ │ └── index.ts │ │ ├── SuccessState │ │ │ ├── SuccessState.tsx │ │ │ └── index.ts │ │ ├── fieldsets │ │ │ ├── AddressInput │ │ │ │ ├── AddressInput.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── updateRecentAddresses.test.ts │ │ │ │ └── updateRecentAddresses.ts │ │ │ ├── NftTransferInput │ │ │ │ ├── NftTransferInput.tsx │ │ │ │ ├── index.ts │ │ │ │ └── styles.module.css │ │ │ └── TokenTransferInput │ │ │ │ ├── TokenTransferInput.tsx │ │ │ │ └── index.ts │ │ ├── index.ts │ │ └── shared │ │ │ ├── SendFormState.ts │ │ │ ├── buildSolanaTransfer.ts │ │ │ ├── helpers.ts │ │ │ ├── prepareSendData.ts │ │ │ ├── useAddressPositionsFromBackendOrNode.ts │ │ │ ├── useCurrentPosition.ts │ │ │ └── useNftPosition.ts │ ├── SendTransaction │ │ ├── NetworkFee │ │ │ ├── NetworkFee.tsx │ │ │ ├── NetworkFeeDialog.tsx │ │ │ ├── NetworkFeeIcon.tsx │ │ │ ├── assets │ │ │ │ ├── custom.png │ │ │ │ ├── custom_2x.png │ │ │ │ ├── fast.png │ │ │ │ ├── fast_2x.png │ │ │ │ ├── standard.png │ │ │ │ └── standard_2x.png │ │ │ ├── constants.ts │ │ │ └── index.ts │ │ ├── NonceLine │ │ │ ├── NonceLine.tsx │ │ │ └── index.ts │ │ ├── SendTransaction.readme.tsx │ │ ├── SendTransaction.tsx │ │ ├── TransactionAdvancedView │ │ │ ├── TransactionAdvancedView.tsx │ │ │ └── index.ts │ │ ├── TransactionConfiguration │ │ │ ├── TransactionConfiguration.tsx │ │ │ ├── applyConfiguration.ts │ │ │ ├── index.ts │ │ │ └── useTransactionFee.ts │ │ ├── TransactionWarnings │ │ │ ├── InsufficientFundsWarning.tsx │ │ │ ├── TransactionWarning.tsx │ │ │ ├── TransactionWarnings.tsx │ │ │ └── index.ts │ │ ├── UnknownIcon │ │ │ ├── UnknownIcon.tsx │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── shared │ │ │ └── transactionErrorToMessage.ts │ │ └── transactions.sample.ts │ ├── Settings │ │ ├── BackupFlowSettingsSection.tsx │ │ ├── PopoverToast │ │ │ ├── PopoverToast.tsx │ │ │ └── index.ts │ │ ├── Preferences.tsx │ │ ├── Settings.tsx │ │ ├── SettingsLinkIcon │ │ │ ├── SettingsLinkIcon.tsx │ │ │ └── index.ts │ │ ├── index.ts │ │ └── useSettingsTodosCount.ts │ ├── SignMessage │ │ ├── SignMessage.readme.tsx │ │ ├── SignMessage.tsx │ │ └── index.ts │ ├── SignTypedData │ │ ├── SignTypedData.readme.tsx │ │ ├── SignTypedData.tsx │ │ ├── TypedDataAdvancedView │ │ │ ├── TypedDataAdvancedView.tsx │ │ │ └── index.ts │ │ └── index.ts │ ├── SwapForm │ │ ├── ApproveHintLine │ │ │ ├── ApproveHintLine.tsx │ │ │ └── index.ts │ │ ├── Quotes │ │ │ ├── FeeDescription.tsx │ │ │ ├── FeeTier.ts │ │ │ ├── QuoteList.tsx │ │ │ ├── RateLine.tsx │ │ │ ├── getQuotesErrorMessage.ts │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── SlippageSettings │ │ │ ├── SlippageLine.tsx │ │ │ ├── SlippageSettings.tsx │ │ │ ├── getSlippageOptions.ts │ │ │ ├── index.ts │ │ │ └── styles.module.css │ │ ├── SuccessState │ │ │ ├── SuccessState.tsx │ │ │ └── index.ts │ │ ├── SwapForm.tsx │ │ ├── fieldsets │ │ │ ├── ReceiveTokenField │ │ │ │ ├── MarketAssetSelect │ │ │ │ │ ├── MarketAssetSelect.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── ReceiveTokenField.tsx │ │ │ │ └── index.ts │ │ │ └── SpendTokenField │ │ │ │ ├── SpendTokenField.tsx │ │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── reverse │ │ │ └── reverse-button-helpers.tsx │ │ ├── shared │ │ │ ├── PriceImpactLine │ │ │ │ ├── PriceImpactLine.tsx │ │ │ │ └── index.ts │ │ │ ├── SwapFormState.ts │ │ │ ├── getPopularTokens.ts │ │ │ ├── price-impact.ts │ │ │ ├── useApproveHandler.ts │ │ │ └── usePosition.ts │ │ └── styles.module.css │ ├── SwitchEthereumChain │ │ ├── SwitchEthereumChain.tsx │ │ └── index.ts │ ├── TestnetModeGuard │ │ ├── TestnetModeGuard.tsx │ │ └── index.ts │ └── WalletSelect │ │ ├── WalletList.tsx │ │ ├── WalletSelect.tsx │ │ ├── index.ts │ │ └── styles.module.css │ ├── popup.html │ ├── shared │ ├── IdempotentRequest.ts │ ├── StoreWatcher.ts │ ├── applyDrawFix.ts │ ├── channels.mock.ts │ ├── channels.ts │ ├── channels.types.ts │ ├── events.ts │ ├── focusNode.ts │ ├── form-data.ts │ ├── forms │ │ ├── HiddenValidationInput.tsx │ │ ├── QuickAmounts.tsx │ │ ├── SuccessState │ │ │ ├── SuccessStateAddress.tsx │ │ │ ├── SuccessStateLoader.module.css │ │ │ ├── SuccessStateLoader.tsx │ │ │ ├── SuccessStateNft.tsx │ │ │ ├── SuccessStateToken.tsx │ │ │ ├── error.svg │ │ │ ├── success.svg │ │ │ └── useActionStatusByHash.ts │ │ ├── inputs.ts │ │ ├── trading │ │ │ └── getDefaultChain.ts │ │ ├── useCustomValidity.ts │ │ ├── useFormValidity.ts │ │ └── useSearchParamsObj.ts │ ├── getDocumentTitle.ts │ ├── getGroupDisplayName.ts │ ├── getRootDomNode.ts │ ├── getWalletDisplayName.ts │ ├── intersperce.test.ts │ ├── intersperce.ts │ ├── isInteractiveElement.ts │ ├── isSessionExpiredError.ts │ ├── meta-app-state.ts │ ├── middleTruncate.ts │ ├── navigation │ │ ├── getBackOrHome.ts │ │ └── useGoBack.ts │ ├── openInNewWindow.ts │ ├── openInTabIfInSidepanel.ts │ ├── openUrl.ts │ ├── prepareForHref.ts │ ├── prepareUserInputSeedOrPrivateKey.ts │ ├── reloadActiveTab.ts │ ├── requests │ │ ├── PortfolioValue │ │ │ ├── ChainValue │ │ │ │ ├── ChainValue.tsx │ │ │ │ └── index.ts │ │ │ ├── PortfolioValue.tsx │ │ │ ├── getAddressPortfolio.ts │ │ │ └── index.ts │ │ ├── addressNfts │ │ │ ├── useAddressNftCollectionStats.ts │ │ │ ├── useAddressNfts.ts │ │ │ └── useNftsTotalValue.ts │ │ ├── fetchAddressPositionFromRpcNode.ts │ │ ├── getActiveTabOrigin.ts │ │ ├── getPermissionsWithWallets.ts │ │ ├── getWalletGroupByAddress.ts │ │ ├── premium │ │ │ └── isPremiumMembership.ts │ │ ├── queryClient.ts │ │ ├── queryClientPersistence.ts │ │ ├── requestChainForOrigin.ts │ │ ├── setCurrentAddress.ts │ │ ├── shared │ │ │ └── createAddressPosition.ts │ │ ├── uiInterpretTransaction.ts │ │ ├── useAddressActivity.ts │ │ ├── useAddressMembership.ts │ │ ├── useAddressPositionsFromNode.ts │ │ ├── useAllExistingAddresses.ts │ │ ├── useAssetsInfoPaginated.ts │ │ ├── useBackupTodosCount.ts │ │ ├── useEventSource.ts │ │ ├── useGasPrices.ts │ │ ├── useIsConnectedToActiveTab.ts │ │ ├── useNativeAsset.ts │ │ ├── useNativeBalance.ts │ │ ├── useOptimisticMutation.ts │ │ ├── useQuotes.ts │ │ ├── useTxEligibility.ts │ │ ├── useWalletGroups.ts │ │ ├── useWalletNameFlags.ts │ │ ├── useWalletParams.ts │ │ └── useWalletsMetaByChunks.ts │ ├── routing │ │ ├── ProgrammaticNavigationHelper │ │ │ ├── ProgrammaticNavigationHelper.tsx │ │ │ └── index.ts │ │ └── helpers.ts │ ├── security-check │ │ ├── DappSecurityCheck.tsx │ │ ├── InterpertationSecurityCheck.tsx │ │ ├── SecurityStatusButton.tsx │ │ ├── index.ts │ │ ├── shield-mask.svg │ │ └── styles.module.css │ ├── setURLSearchParams.ts │ ├── truncateAddress.test.ts │ ├── truncateAddress.ts │ ├── typography.ts │ ├── updateSearchParam.ts │ ├── useCopyToClipboard.ts │ ├── useDebouncedCallback.ts │ ├── useErrorBoundary.ts │ ├── useEvent.ts │ ├── useMnemonicInput.tsx │ ├── useNavigationState.ts │ ├── useProfileName.ts │ ├── useScreenViewChange.ts │ ├── useStaleTime.ts │ ├── useWindowSizeStore.ts │ ├── user-address │ │ └── useAddressParams.ts │ ├── wallet │ │ ├── getWalletProfiles.ts │ │ └── signMessage.ts │ └── zeroize-submission.ts │ ├── sidepanel.html │ ├── style │ ├── fonts.module.css │ ├── fonts │ │ ├── AeonikPro-Medium.woff │ │ ├── AeonikPro-Medium.woff2 │ │ ├── AeonikPro-Regular.woff │ │ └── AeonikPro-Regular.woff2 │ ├── global.module.css │ ├── helpers.module.css │ └── theme.module.css │ ├── transactions │ ├── filterAddressTransactions.ts │ ├── transactions-store.ts │ ├── useLocalAddressTransactions.ts │ ├── useLocalTransactionStatus.ts │ ├── usePendingTransactions.ts │ └── usePositionsRefetchInterval.ts │ └── ui-kit │ ├── AnimatedCheckmark │ ├── AnimatedCheckmark.tsx │ └── index.ts │ ├── BottomPanel │ ├── BottomPanel.tsx │ ├── index.ts │ └── styles.module.css │ ├── Button │ ├── Button.tsx │ ├── HoldableButton.tsx │ ├── holdableStyles.module.css │ ├── index.ts │ └── styles.module.css │ ├── CircleSpinner │ ├── CircleSpinner.tsx │ ├── index.ts │ └── styles.module.css │ ├── FormFieldset │ ├── FormFieldset.tsx │ ├── index.ts │ └── styles.module.css │ ├── Frame │ ├── Frame.tsx │ ├── index.ts │ └── styles.module.css │ ├── FrameList │ ├── FrameListItem.tsx │ ├── index.ts │ └── styles.module.css │ ├── HStack │ ├── HStack.tsx │ └── index.ts │ ├── Input │ ├── DebouncedInput.tsx │ ├── InnerLabelInput │ │ ├── InnerLabelInput.tsx │ │ └── index.ts │ ├── Input.tsx │ ├── InputDecorator │ │ ├── InputDecorator.tsx │ │ └── index.ts │ ├── SearchInput │ │ ├── SearchInput.tsx │ │ └── index.ts │ ├── assets │ │ ├── close-primary-dark.svg │ │ └── close-primary.svg │ ├── index.ts │ └── styles.module.css │ ├── Media │ ├── Media.tsx │ └── index.ts │ ├── MediaContent │ ├── MediaContent.tsx │ └── index.ts │ ├── MediaFallback │ ├── MediaFallback.tsx │ └── index.ts │ ├── ModalDialogs │ ├── BaseDialog.tsx │ ├── BottomSheetDialog │ │ ├── BottomSheetDialog.tsx │ │ ├── index.ts │ │ └── styles.module.css │ ├── CenteredDialog │ │ ├── CenteredDialog.tsx │ │ ├── index.ts │ │ └── styles.module.css │ ├── DialogTitle │ │ ├── DialogCloseButton.tsx │ │ ├── DialogTitle.tsx │ │ └── index.ts │ ├── HTMLDialogElementInterface.ts │ └── showConfirmDialog.ts │ ├── NeutralDecimals │ ├── NeutralDecimals.tsx │ └── index.ts │ ├── Radio │ ├── Radio.module.css │ ├── Radio.readme.tsx │ ├── Radio.tsx │ └── index.ts │ ├── SegmentedControl │ ├── SegmentedControl.module.css │ ├── SegmentedControl.tsx │ └── index.ts │ ├── Spacer │ ├── Spacer.tsx │ └── index.ts │ ├── SquareElement │ ├── SquareElement.tsx │ └── index.ts │ ├── Stack │ ├── Stack.tsx │ └── index.ts │ ├── Surface │ ├── Surface.tsx │ └── index.ts │ ├── SurfaceList │ ├── SurfaceList.readme.tsx │ ├── SurfaceList.tsx │ ├── VirtualizedSurfaceList │ │ ├── VirtualizedSurfaceList.tsx │ │ └── index.ts │ ├── index.ts │ └── styles.module.css │ ├── Tag │ ├── Tag.module.css │ ├── Tag.tsx │ └── index.ts │ ├── TextAnchor │ ├── TextAnchor.tsx │ ├── index.ts │ └── styles.module.css │ ├── TextLink │ ├── TextLink.tsx │ └── index.ts │ ├── Toggle.ts │ ├── TokenIcon │ ├── TokenIcon.tsx │ └── index.ts │ ├── Twinkle │ ├── Twinkle.tsx │ ├── index.ts │ └── styles.module.css │ ├── UIText.ts │ ├── UnstyledAnchor │ ├── UnstyledAnchor.tsx │ ├── index.ts │ └── styles.module.css │ ├── UnstyledButton │ ├── UnstyledButton.module.css │ ├── UnstyledButton.tsx │ └── index.ts │ ├── UnstyledInput │ ├── UnstyledInput.tsx │ ├── index.ts │ └── styles.module.css │ ├── UnstyledLink │ ├── UnstyledLink.tsx │ ├── index.ts │ └── styles.module.css │ ├── VStack │ ├── VStack.tsx │ └── index.ts │ └── ZStack │ ├── ZStack.tsx │ ├── index.ts │ └── styles.module.css ├── svgo.config.js └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .env 4 | .eslintcache 5 | .parcel-cache 6 | /test-results/ 7 | /e2e-report/ 8 | /blob-report/ 9 | /playwright/.cache/ 10 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.parcelrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@parcel/config-webextension", 3 | "transformers": { 4 | "jsx:*.svg": ["@parcel/transformer-svg-react"], 5 | "jsx:*": ["..."] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "overrides": [ 4 | { 5 | "files": "*.md", 6 | "options": { 7 | "printWidth": 70, 8 | "trailingComma": "none", 9 | "arrowParens": "avoid", 10 | "proseWrap": "never" 11 | } 12 | }, 13 | { 14 | "files": "src/env/config.ts", 15 | "options": { 16 | "printWidth": 120 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /e2e/fixtures/types.ts: -------------------------------------------------------------------------------- 1 | export type TestWalletActor = 'alice' | 'bob' | 'charlie'; 2 | 3 | export type TestWallet = { 4 | address: string; 5 | privateKey: string; 6 | recoveryPhrase: string; 7 | }; 8 | -------------------------------------------------------------------------------- /e2e/utils/wallet.ts: -------------------------------------------------------------------------------- 1 | import { Wallet as EthersV5Wallet } from '@ethersproject/wallet'; 2 | import type { BareWallet } from 'src/shared/types/BareWallet'; 3 | 4 | export function generateRandomRecoveryPhrase() { 5 | return EthersV5Wallet.createRandom().mnemonic.phrase; 6 | } 7 | 8 | export function generateRandomWallet(): BareWallet { 9 | const wallet = EthersV5Wallet.createRandom(); 10 | return { 11 | name: null, 12 | address: wallet.address, 13 | privateKey: wallet.privateKey, 14 | mnemonic: wallet.mnemonic, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('ts-jest').JestConfigWithTsJest} */ 2 | module.exports = { 3 | // preset: 'ts-jest', 4 | 5 | modulePaths: ['/'], 6 | // moduleDirectories: ['node_modules', 'src'], 7 | testPathIgnorePatterns: [ 8 | '/node_modules/', 9 | '/lib/', 10 | '/e2e/', 11 | ], 12 | transform: { '^.+\\.tsx?$': ['ts-jest', { useESM: true }] }, 13 | extensionsToTreatAsEsm: ['.ts'], 14 | testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', 15 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], 16 | }; 17 | -------------------------------------------------------------------------------- /physical-link.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | manifest: { 3 | '@zeriontech/hardware-wallet-connection': '../zeriontech/hardware-wallet-connection', 4 | '@zeriontech/components': '../zeriontech/components', 5 | '@zeriontech/transactions': '../zeriontech/transactions', 6 | '@zeriontech/solana-wallet-standard': '../zeriontech/solana-wallet-standard', 7 | 'defi-sdk': '../zeriontech/defi-sdk-js', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /scripts/execAsync.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | const { exec } = require('child_process'); 3 | 4 | async function execAsync(command) { 5 | return new Promise((resolve, reject) => { 6 | exec(command, (err) => { 7 | if (err) { 8 | reject(err); 9 | } else { 10 | resolve(); 11 | } 12 | }); 13 | }); 14 | } 15 | 16 | module.exports = { execAsync }; 17 | -------------------------------------------------------------------------------- /src/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "Zerion: Wallet for Web3 & NFTs", 4 | "description": "The name of the application" 5 | }, 6 | "appDescription": { 7 | "message": "A crypto wallet for everything onchain. Browse, own, and unlock the new internet.", 8 | "description": "The description of the application" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/background/Wallet/model/BareWallet.ts: -------------------------------------------------------------------------------- 1 | import type { ExternallyOwnedAccount } from './AccountContainer'; 2 | import type { MaskedSignerObject, SignerObject } from './SignerObject'; 3 | 4 | // TODO: rename BareWallet to SignerWallet? 5 | export interface BareWallet extends ExternallyOwnedAccount, SignerObject {} 6 | export interface BareMnemonicWallet extends BareWallet { 7 | mnemonic: NonNullable; 8 | } 9 | 10 | export interface MaskedBareWallet 11 | extends ExternallyOwnedAccount, 12 | MaskedSignerObject {} 13 | -------------------------------------------------------------------------------- /src/background/Wallet/model/SeedType.ts: -------------------------------------------------------------------------------- 1 | export enum SeedType { 2 | privateKey, 3 | mnemonic, 4 | } 5 | -------------------------------------------------------------------------------- /src/background/Wallet/model/SignerObject.ts: -------------------------------------------------------------------------------- 1 | import type { ethers } from 'ethers'; 2 | import type { LocallyEncoded } from 'src/shared/wallet/encode-locally'; 3 | 4 | export interface SignerObject { 5 | mnemonic: { phrase: string; path: string } | null; 6 | privateKey: ethers.Wallet['privateKey']; 7 | } 8 | 9 | export interface MaskedSignerObject { 10 | mnemonic: { phrase: LocallyEncoded; path: string } | null; 11 | privateKey: LocallyEncoded; 12 | } 13 | -------------------------------------------------------------------------------- /src/background/Wallet/model/WalletNameFlag.ts: -------------------------------------------------------------------------------- 1 | export enum WalletNameFlag { 2 | isMetaMask = 'isMetaMask', 3 | } 4 | -------------------------------------------------------------------------------- /src/background/Wallet/model/WalletOrigin.ts: -------------------------------------------------------------------------------- 1 | export enum WalletOrigin { 2 | imported, 3 | extension, 4 | } 5 | -------------------------------------------------------------------------------- /src/background/account/account-helpers.client.ts: -------------------------------------------------------------------------------- 1 | import { BrowserStorage } from 'src/background/webapis/storage'; 2 | import { currentUserKey } from 'src/shared/getCurrentUser'; 3 | import type { User } from 'src/shared/types/User'; 4 | 5 | export async function getUserId() { 6 | const user = await BrowserStorage.get(currentUserKey); 7 | return user?.id; 8 | } 9 | -------------------------------------------------------------------------------- /src/background/account/storage-keys.ts: -------------------------------------------------------------------------------- 1 | export const credentialsKey = 'credentials'; 2 | -------------------------------------------------------------------------------- /src/background/constants.mock.ts: -------------------------------------------------------------------------------- 1 | export const INTERNAL_ORIGIN = 'chrome-extension://extension-id'; 2 | export const INTERNAL_ORIGIN_SYMBOL = Symbol(); 3 | -------------------------------------------------------------------------------- /src/background/constants.ts: -------------------------------------------------------------------------------- 1 | // TODO: Move from Background folder 2 | export const INTERNAL_ORIGIN = `chrome-extension://${chrome.runtime.id}`; 3 | export const INTERNAL_ORIGIN_SYMBOL = Symbol(); 4 | -------------------------------------------------------------------------------- /src/background/messaging/PortContext.ts: -------------------------------------------------------------------------------- 1 | export interface PortContext { 2 | origin?: string; 3 | tabId?: number; 4 | } 5 | -------------------------------------------------------------------------------- /src/background/webapis/RuntimePort.ts: -------------------------------------------------------------------------------- 1 | import type browser from 'webextension-polyfill'; 2 | 3 | export type RuntimePort = browser.Runtime.Port | chrome.runtime.Port; 4 | -------------------------------------------------------------------------------- /src/content-script/dapp-configs.ts: -------------------------------------------------------------------------------- 1 | export const dappsWithoutCorrectEIP1193Support = new Set([ 2 | 'https://app.frax.finance', 3 | 'https://www.stealcam.com', 4 | ]); 5 | -------------------------------------------------------------------------------- /src/images/logo-icon-128-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-128-disabled.png -------------------------------------------------------------------------------- /src/images/logo-icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-128.png -------------------------------------------------------------------------------- /src/images/logo-icon-16-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-16-disabled.png -------------------------------------------------------------------------------- /src/images/logo-icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-16.png -------------------------------------------------------------------------------- /src/images/logo-icon-32-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-32-disabled.png -------------------------------------------------------------------------------- /src/images/logo-icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-32.png -------------------------------------------------------------------------------- /src/images/logo-icon-48-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-48-disabled.png -------------------------------------------------------------------------------- /src/images/logo-icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-48.png -------------------------------------------------------------------------------- /src/images/logo-icon-dev-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-dev-128.png -------------------------------------------------------------------------------- /src/images/logo-icon-qa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon-qa.png -------------------------------------------------------------------------------- /src/images/logo-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/logo-icon.png -------------------------------------------------------------------------------- /src/images/sample-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/images/sample-avatar.png -------------------------------------------------------------------------------- /src/modules/crypto/getSHA256HexDigest.ts: -------------------------------------------------------------------------------- 1 | import { utf8ToUint8Array } from './convert'; 2 | 3 | export async function getSHA256HexDigest(message: string): Promise { 4 | const data = utf8ToUint8Array(message); 5 | const hashBuffer = await crypto.subtle.digest('SHA-256', data); 6 | const hashArray = Array.from(new Uint8Array(hashBuffer)); // convert buffer to byte array 7 | const hashHex = hashArray 8 | .map((b) => b.toString(16).padStart(2, '0')) 9 | .join(''); // convert bytes to hex string 10 | return hashHex; 11 | } 12 | -------------------------------------------------------------------------------- /src/modules/crypto/index.ts: -------------------------------------------------------------------------------- 1 | export { getRandomUint8Array, getRandomBase64 } from './random'; 2 | export { 3 | utf8ToUint8Array, 4 | uint8ArrayToUtf8, 5 | arrayBufferToUtf8, 6 | base64ToArrayBuffer, 7 | arrayBufferToBase64, 8 | base64ToUint8Array, 9 | uint8ArrayToBase64, 10 | } from './convert'; 11 | export { createSalt, createCryptoKey } from './key'; 12 | export { encrypt, decrypt } from './aes'; 13 | export { stableEncrypt, stableDecrypt } from './aesStable'; 14 | -------------------------------------------------------------------------------- /src/modules/crypto/types.ts: -------------------------------------------------------------------------------- 1 | export interface StableEncrypted { 2 | data: string; 3 | version: number; 4 | } 5 | 6 | export interface Encrypted extends StableEncrypted { 7 | salt: string; 8 | iv: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/modules/currency/useCurrency.ts: -------------------------------------------------------------------------------- 1 | import { useStore } from '@store-unit/react'; 2 | import { preferenceStore } from 'src/ui/features/appearance'; 3 | 4 | export function useCurrency() { 5 | return useStore(preferenceStore) as { currency: string }; 6 | } 7 | -------------------------------------------------------------------------------- /src/modules/defi-sdk/isTestClient.ts: -------------------------------------------------------------------------------- 1 | import type { Client } from 'defi-sdk'; 2 | import { DEFI_SDK_TESTNET_API_URL } from 'src/env/config'; 3 | 4 | export function isTestClient(client: Client) { 5 | return client.url === DEFI_SDK_TESTNET_API_URL; 6 | } 7 | -------------------------------------------------------------------------------- /src/modules/defi-sdk/useDefiSdkClient.ts: -------------------------------------------------------------------------------- 1 | import { usePreferences } from 'src/ui/features/preferences'; 2 | import { client } from 'defi-sdk'; 3 | import { configureUITestClient } from './index'; 4 | 5 | export function useDefiSdkClient() { 6 | const { preferences } = usePreferences(); 7 | return preferences?.testnetMode?.on ? configureUITestClient() : client; 8 | } 9 | -------------------------------------------------------------------------------- /src/modules/detect-browser/index.ts: -------------------------------------------------------------------------------- 1 | export { detectBrowser } from './detect-browser'; 2 | -------------------------------------------------------------------------------- /src/modules/dna-service/dna.client.ts: -------------------------------------------------------------------------------- 1 | import { dnaServicePort } from 'src/ui/shared/channels'; 2 | 3 | export function initDnaApi() { 4 | // dnaServicePort.request('developerOnly_resetActionQueue'); 5 | dnaServicePort.request('tryRegisterAction'); 6 | } 7 | 8 | export async function updateAddressDnaInfo(address: string) { 9 | await dnaServicePort.request('gm', { address }); 10 | } 11 | -------------------------------------------------------------------------------- /src/modules/ethereum/abi/allowance-abi.ts: -------------------------------------------------------------------------------- 1 | export const ERC20_ALLOWANCE_ABI = [ 2 | { 3 | constant: true, 4 | inputs: [ 5 | { name: '_owner', type: 'address' }, 6 | { name: '_spender', type: 'address' }, 7 | ], 8 | name: 'allowance', 9 | outputs: [{ name: '', type: 'uint256' }], 10 | payable: false, 11 | stateMutability: 'view', 12 | type: 'function', 13 | }, 14 | ]; 15 | -------------------------------------------------------------------------------- /src/modules/ethereum/account-abstraction/constants.ts: -------------------------------------------------------------------------------- 1 | import { valueToHex } from 'src/shared/units/valueToHex'; 2 | 3 | export const GAS_PER_PUBDATA_BYTE_DEFAULT = valueToHex(50000); 4 | -------------------------------------------------------------------------------- /src/modules/ethereum/chains/constants.ts: -------------------------------------------------------------------------------- 1 | export const BACKEND_NETWORK_ORIGIN = 'backend'; 2 | -------------------------------------------------------------------------------- /src/modules/ethereum/chains/helpers.ts: -------------------------------------------------------------------------------- 1 | import { normalizeChainId } from 'src/shared/normalizeChainId'; 2 | 3 | const CUSTOM_NETWORK_PREFIX = 'zerion-custom-network-'; 4 | 5 | export function toCustomNetworkId(chainId: string) { 6 | return `${CUSTOM_NETWORK_PREFIX}${normalizeChainId(chainId)}`; 7 | } 8 | 9 | export function isCustomNetworkId(networkId: string) { 10 | return networkId.startsWith(CUSTOM_NETWORK_PREFIX); 11 | } 12 | -------------------------------------------------------------------------------- /src/modules/ethereum/constants.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | import { ethers } from 'ethers'; 3 | 4 | // 2 ** 256 - 1 5 | export const UNLIMITED_APPROVAL_AMOUNT = new BigNumber( 6 | ethers.MaxUint256.toString() 7 | ); 8 | -------------------------------------------------------------------------------- /src/modules/ethereum/eth_getBalance.ts: -------------------------------------------------------------------------------- 1 | import { sendRpcRequest } from 'src/shared/custom-rpc/rpc-request'; 2 | 3 | export async function eth_getBalance( 4 | url: string, 5 | address: string 6 | ): Promise { 7 | const { result: balanceInHex } = await sendRpcRequest(url, { 8 | method: 'eth_getBalance', 9 | params: [address], 10 | }); 11 | const balance = BigInt(balanceInHex).toString(); 12 | return balance; 13 | } 14 | -------------------------------------------------------------------------------- /src/modules/ethereum/message-signing/TypedData.ts: -------------------------------------------------------------------------------- 1 | import type { TypedDataDomain, TypedDataField } from 'ethers'; 2 | 3 | export interface TypedData { 4 | domain: TypedDataDomain; 5 | types: Record>; 6 | message: Record; // eslint-disable-line @typescript-eslint/no-explicit-any 7 | primaryType?: string; 8 | } 9 | -------------------------------------------------------------------------------- /src/modules/ethereum/message-signing/toUtf8String.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from 'ethers'; 2 | 3 | export function toUtf8String(value: ethers.BytesLike) { 4 | try { 5 | return ethers.toUtf8String(value); 6 | } catch (e) { 7 | if (typeof value === 'string') { 8 | return value; 9 | } else { 10 | throw e; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/modules/ethereum/requests/getRpcProvider.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from 'ethers'; 2 | import memoize from 'lodash/memoize'; 3 | 4 | export const getRpcProvider = memoize((rpcUrl: string) => { 5 | return new ethers.JsonRpcProvider(rpcUrl); 6 | }); 7 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/ChainId.ts: -------------------------------------------------------------------------------- 1 | import type { Brand } from 'src/shared/type-utils/Brand'; 2 | 3 | export type ChainId = Brand; 4 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/ChainIdValue.ts: -------------------------------------------------------------------------------- 1 | export enum ChainIdValue { 2 | Mainnet = '0x1', 3 | } 4 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/addressAction/index.ts: -------------------------------------------------------------------------------- 1 | export * from './addressActionMain'; 2 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/gasPrices/EIP1559.ts: -------------------------------------------------------------------------------- 1 | import type { EIP1559 } from '@zeriontech/transactions'; 2 | 3 | export type EIP1559Base = EIP1559 & { 4 | baseFee: number; 5 | }; 6 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/gasPrices/GasPriceObject.ts: -------------------------------------------------------------------------------- 1 | import type { EIP1559 } from '@zeriontech/transactions'; 2 | 3 | export interface GasPriceObject { 4 | classic: number | string | null; 5 | eip1559: EIP1559 | null; 6 | optimistic: { 7 | underlying: { classic: number | string | null; eip1559: EIP1559 | null }; 8 | } | null; 9 | } 10 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/gasPrices/eip1559/estimateFee.ts: -------------------------------------------------------------------------------- 1 | import type { EIP1559 } from '@zeriontech/transactions'; 2 | import BigNumber from 'bignumber.js'; 3 | 4 | export function estimateFee({ 5 | gas, 6 | eip1559, 7 | baseFee, 8 | }: { 9 | gas: string | number; 10 | eip1559: EIP1559; 11 | baseFee: number; 12 | }): BigNumber { 13 | const intendedFee = baseFee + (eip1559.priorityFee || 0); 14 | const pricePerUnit = Math.min(intendedFee, eip1559.maxFee); 15 | return new BigNumber(gas).times(pricePerUnit); 16 | } 17 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/gasPrices/estimateNetworkFee.test.ts: -------------------------------------------------------------------------------- 1 | import { estimateNetworkFee } from './estimateNetworkFee'; 2 | import { samples } from './estimateNetworkFee.samples'; 3 | 4 | describe('feeEstimation for optimism', () => { 5 | test('returns integer values', async () => { 6 | const result = await estimateNetworkFee(samples.optimistic.input1); 7 | expect(result).toEqual({ 8 | type: 'optimistic', 9 | estimatedFee: 33077529225575, 10 | maxFee: 65204474524549, 11 | }); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/getBestKnownTransactionCount/backgroundGetBestKnownTransactionCount.ts: -------------------------------------------------------------------------------- 1 | import { transactionService } from 'src/background/transactions/TransactionService'; 2 | import { getBestKnownTransactionCount } from '../getTransactionCount'; 3 | 4 | export async function backgroundGetBestKnownTransactionCount( 5 | params: Parameters[1] 6 | ) { 7 | const state = await transactionService.getTransactionsStore().getSavedState(); 8 | return getBestKnownTransactionCount(state, params); 9 | } 10 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/getBestKnownTransactionCount/uiGetBestKnownTransactionCount.ts: -------------------------------------------------------------------------------- 1 | import { localTransactionsStore } from 'src/ui/transactions/transactions-store'; 2 | import { getBestKnownTransactionCount } from '../getTransactionCount'; 3 | 4 | export async function uiGetBestKnownTransactionCount( 5 | params: Parameters[1] 6 | ) { 7 | const state = localTransactionsStore.getState(); 8 | return getBestKnownTransactionCount(state, params); 9 | } 10 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/getChainId.ts: -------------------------------------------------------------------------------- 1 | import { valueToHex } from 'src/shared/units/valueToHex'; 2 | import type { IncomingTransaction } from '../types/IncomingTransaction'; 3 | import { ChainIdValue } from './ChainIdValue'; 4 | 5 | export function getChainId(transaction: IncomingTransaction) { 6 | const { chainId } = transaction; 7 | return chainId ? valueToHex(chainId) : ChainIdValue.Mainnet; 8 | } 9 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/getGas.ts: -------------------------------------------------------------------------------- 1 | export function getGas(transaction: { gas?: A; gasLimit?: A }) { 2 | return transaction.gas ?? transaction.gasLimit; 3 | } 4 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/normalizeTransactionChainId.ts: -------------------------------------------------------------------------------- 1 | import { normalizeChainId } from 'src/shared/normalizeChainId'; 2 | import type { IncomingTransaction } from '../types/IncomingTransaction'; 3 | 4 | export function normalizeTransactionChainId(transaction: IncomingTransaction) { 5 | return transaction.chainId ? normalizeChainId(transaction.chainId) : null; 6 | } 7 | -------------------------------------------------------------------------------- /src/modules/ethereum/transactions/resolveChainId.ts: -------------------------------------------------------------------------------- 1 | import { invariant } from 'src/shared/invariant'; 2 | import { normalizeChainId } from 'src/shared/normalizeChainId'; 3 | import type { IncomingTransaction } from '../types/IncomingTransaction'; 4 | 5 | export function resolveChainId(transaction: IncomingTransaction) { 6 | const { chainId: incomingChainId } = transaction; 7 | invariant(incomingChainId, 'Transaction object must have a chainId property'); 8 | return normalizeChainId(incomingChainId); 9 | } 10 | -------------------------------------------------------------------------------- /src/modules/ethereum/types/AddEthereumChainParameter.ts: -------------------------------------------------------------------------------- 1 | export interface AddEthereumChainParameter { 2 | chainId: string; // A 0x-prefixed hexadecimal string 3 | chainName: string; 4 | nativeCurrency: { 5 | // code: string | null; 6 | name: string; 7 | symbol: string; // 2-6 characters long 8 | decimals: number; // 18 9 | }; 10 | rpcUrls: string[]; 11 | blockExplorerUrls?: string[]; 12 | iconUrls?: string[]; // Currently ignored. 13 | hidden?: boolean; // Not in standart, but this is a part of Network Form 14 | } 15 | -------------------------------------------------------------------------------- /src/modules/networks/Chain.ts: -------------------------------------------------------------------------------- 1 | import memoize from 'lodash/memoize'; 2 | 3 | export class Chain { 4 | value: string; 5 | 6 | constructor(value: string) { 7 | this.value = value; 8 | } 9 | 10 | toString() { 11 | return this.value; 12 | } 13 | } 14 | 15 | export const createChain = memoize((chain: string) => new Chain(chain)); 16 | -------------------------------------------------------------------------------- /src/modules/networks/NetworkId.ts: -------------------------------------------------------------------------------- 1 | export enum NetworkId { 2 | Ethereum = 'ethereum', 3 | Zero = 'zero', 4 | Solana = 'solana', 5 | } 6 | -------------------------------------------------------------------------------- /src/modules/networks/NetworkSelectValue.ts: -------------------------------------------------------------------------------- 1 | export enum NetworkSelectValue { 2 | All = 'All', 3 | } 4 | -------------------------------------------------------------------------------- /src/modules/networks/errors.ts: -------------------------------------------------------------------------------- 1 | export class UnsupportedNetwork extends Error {} 2 | -------------------------------------------------------------------------------- /src/modules/query-client/query-client.background.ts: -------------------------------------------------------------------------------- 1 | import { QueryClient } from '@tanstack/react-query'; 2 | 3 | export const backgroundQueryClient = new QueryClient(); 4 | -------------------------------------------------------------------------------- /src/modules/remote-config/ConfigPlugin.ts: -------------------------------------------------------------------------------- 1 | export interface ConfigPlugin { 2 | onRegister(): void; 3 | initialize(): void; 4 | get(key: string): undefined | { value: unknown }; 5 | } 6 | -------------------------------------------------------------------------------- /src/modules/remote-config/index.ts: -------------------------------------------------------------------------------- 1 | import { firebase as firebasePlugin } from './plugins/firebase'; 2 | import { activatePlugins, registerConfigPlugin, get } from './pluginSystem'; 3 | 4 | export { RemoteConfig } from './types'; 5 | 6 | // Register plugins 7 | registerConfigPlugin(firebasePlugin); 8 | 9 | export async function initialize() { 10 | return activatePlugins(); 11 | } 12 | 13 | export function getRemoteConfigValue(key: string) { 14 | return get(key); 15 | } 16 | -------------------------------------------------------------------------------- /src/modules/solana/SolTransaction.ts: -------------------------------------------------------------------------------- 1 | import type { Transaction, VersionedTransaction } from '@solana/web3.js'; 2 | import type { StringBase64 } from 'src/shared/types/StringBase64'; 3 | 4 | export { Transaction as SolanaTransactionLegacy } from '@solana/web3.js'; 5 | export type SolTransaction = Transaction | VersionedTransaction; 6 | 7 | export type SolTxSerializable = StringBase64; 8 | -------------------------------------------------------------------------------- /src/modules/solana/icon.ts: -------------------------------------------------------------------------------- 1 | import type { WalletIcon } from '@zeriontech/solana-wallet-standard'; 2 | 3 | import zerionLogoDataUrl from 'data-url:src/ui/assets/zerion-logo-blue.svg'; 4 | 5 | export const icon: WalletIcon = zerionLogoDataUrl as WalletIcon; 6 | -------------------------------------------------------------------------------- /src/modules/solana/transactions/SolTransactionResponse.ts: -------------------------------------------------------------------------------- 1 | import type { StringBase64 } from 'src/shared/types/StringBase64'; 2 | 3 | interface SignResult { 4 | signature: string; 5 | publicKey: string; 6 | tx: StringBase64; 7 | } 8 | 9 | export type SolSignTransactionResult = SignResult; 10 | -------------------------------------------------------------------------------- /src/modules/zerion-api/getHttpClientSource.ts: -------------------------------------------------------------------------------- 1 | import { getPreferences } from 'src/ui/features/preferences/usePreferences'; 2 | import type { BackendSourceParams } from './shared'; 3 | 4 | type Source = BackendSourceParams['source']; 5 | export async function getHttpClientSource(): Promise { 6 | const preferences = await getPreferences(); 7 | return preferences?.testnetMode?.on ? 'testnet' : 'mainnet'; 8 | } 9 | -------------------------------------------------------------------------------- /src/modules/zerion-api/hooks/useAssetChart.ts: -------------------------------------------------------------------------------- 1 | import { useQuery } from '@tanstack/react-query'; 2 | import { ZerionAPI } from 'src/modules/zerion-api/zerion-api.client'; 3 | import { type Params } from '../requests/asset-get-chart'; 4 | 5 | export function useAssetChart(params: Params) { 6 | return useQuery({ 7 | queryKey: ['assetGetChart', params], 8 | queryFn: () => ZerionAPI.assetGetChart(params), 9 | suspense: false, 10 | keepPreviousData: true, 11 | staleTime: 1000 * 60, 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /src/modules/zerion-api/hooks/useHttpClientSource.ts: -------------------------------------------------------------------------------- 1 | import { usePreferences } from 'src/ui/features/preferences'; 2 | import type { BackendSourceParams } from '../shared'; 3 | 4 | export function useHttpClientSource(): BackendSourceParams['source'] { 5 | const { preferences } = usePreferences(); 6 | return preferences?.testnetMode?.on ? 'testnet' : 'mainnet'; 7 | } 8 | -------------------------------------------------------------------------------- /src/modules/zerion-api/requests/ResponseBody.ts: -------------------------------------------------------------------------------- 1 | export type ResponseBody = { 2 | data: T; 3 | errors?: { title: string; detail: string }[]; 4 | }; 5 | -------------------------------------------------------------------------------- /src/modules/zerion-api/requests/shared.client.ts: -------------------------------------------------------------------------------- 1 | import { 2 | getProviderForApiV4, 3 | getProviderNameFromGroup, 4 | } from 'src/shared/analytics/shared/getProviderNameFromGroup'; 5 | import { walletPort } from 'src/ui/shared/channels'; 6 | 7 | export async function getAddressProviderHeader(address: string) { 8 | const group = await walletPort.request('getWalletGroupByAddress', { 9 | address, 10 | }); 11 | return getProviderForApiV4(getProviderNameFromGroup(group)); 12 | } 13 | -------------------------------------------------------------------------------- /src/modules/zerion-api/types/NetworkFeeType.ts: -------------------------------------------------------------------------------- 1 | import type { Fungible } from './Fungible'; 2 | 3 | export interface NetworkFeeType { 4 | free: boolean; 5 | amount: { 6 | /** @description Amount in common units (like token units) */ 7 | quantity: string; 8 | /** @description Amount in fiat units */ 9 | value: number | null; 10 | usdValue: number | null; 11 | }; 12 | fungible: null | Fungible; 13 | } 14 | -------------------------------------------------------------------------------- /src/shared/Disposable.ts: -------------------------------------------------------------------------------- 1 | export class Disposable { 2 | private disposables: Array<() => void> = []; 3 | 4 | add(disposable: () => void) { 5 | this.disposables.push(disposable); 6 | } 7 | 8 | clearAll() { 9 | this.disposables.forEach((disposable) => disposable()); 10 | this.disposables.length = 0; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/shared/SeedType.ts: -------------------------------------------------------------------------------- 1 | export { SeedType } from 'src/background/Wallet/model/SeedType'; 2 | -------------------------------------------------------------------------------- /src/shared/WalletOrigin.ts: -------------------------------------------------------------------------------- 1 | export { WalletOrigin } from 'src/background/Wallet/model/WalletOrigin'; 2 | -------------------------------------------------------------------------------- /src/shared/analytics/platform.ts: -------------------------------------------------------------------------------- 1 | export const platform = 'web-extension'; 2 | -------------------------------------------------------------------------------- /src/shared/analytics/shared/omitNullParams.ts: -------------------------------------------------------------------------------- 1 | import { produce } from 'immer'; 2 | 3 | export function omitNullParams(params: T): Partial { 4 | return produce(params, (draft) => { 5 | for (const key in draft) { 6 | if (draft[key] == null) { 7 | delete draft[key]; 8 | } 9 | } 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /src/shared/core/isClassProperty.ts: -------------------------------------------------------------------------------- 1 | export function isClassProperty( 2 | object: T, 3 | method: string | K 4 | ): method is K { 5 | const prototype = Object.getPrototypeOf(object); 6 | return ( 7 | Object.prototype.hasOwnProperty.call(object, method) || 8 | Object.prototype.hasOwnProperty.call(prototype, method) 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /src/shared/custom-rpc/formatJsonRpcRequestPatched.ts: -------------------------------------------------------------------------------- 1 | import { formatJsonRpcRequest } from '@walletconnect/jsonrpc-utils'; 2 | import { getPayloadId } from './getPayloadId'; 3 | 4 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 5 | export function formatJsonRpcRequestPatched( 6 | method: string, 7 | params: T, 8 | maybeId?: number 9 | ) { 10 | /** Use our own getPayloadId() which guarantees uniqueness */ 11 | const id = maybeId ?? getPayloadId(); 12 | return formatJsonRpcRequest(method, params, id); 13 | } 14 | -------------------------------------------------------------------------------- /src/shared/custom-rpc/getPayloadId.ts: -------------------------------------------------------------------------------- 1 | let i = 1; 2 | const initialValue = crypto.getRandomValues(new Uint32Array(1))[0]; 3 | 4 | /** 5 | * returns a unique random value always larger than the previous one 6 | */ 7 | export function getPayloadId(): number { 8 | return initialValue + i++; 9 | } 10 | -------------------------------------------------------------------------------- /src/shared/dapps/index.ts: -------------------------------------------------------------------------------- 1 | export function getNameFromOrigin(origin: string) { 2 | return new URL(origin).hostname; 3 | } 4 | -------------------------------------------------------------------------------- /src/shared/dapps/known-dapps.ts: -------------------------------------------------------------------------------- 1 | import { data } from './dapps-list.data'; 2 | 3 | const knownDappOrigins = new Set( 4 | data.map((entry) => new URL(entry.url).origin) 5 | ); 6 | 7 | export function isKnownDapp({ origin }: { origin: string }) { 8 | return knownDappOrigins.has(origin); 9 | } 10 | -------------------------------------------------------------------------------- /src/shared/difference.ts: -------------------------------------------------------------------------------- 1 | export function difference(a: T[], b: T[]) { 2 | const set = new Set(b); 3 | return a.filter((value) => !set.has(value)); 4 | } 5 | -------------------------------------------------------------------------------- /src/shared/errors/getError.ts: -------------------------------------------------------------------------------- 1 | import { getError as getErrorBase } from 'get-error'; 2 | 3 | export function normalizeErrorMessage(error: Error) { 4 | if (!error.message) { 5 | const clone = structuredClone(error); 6 | const message = error.message || error.name; 7 | Object.defineProperty(clone, 'message', { value: message }); 8 | return clone; 9 | } else { 10 | return error; 11 | } 12 | } 13 | 14 | export function getError(value: Error | unknown): Error { 15 | return normalizeErrorMessage(getErrorBase(value)); 16 | } 17 | -------------------------------------------------------------------------------- /src/shared/getCurrentUser.ts: -------------------------------------------------------------------------------- 1 | import { BrowserStorage } from 'src/background/webapis/storage'; 2 | import type { User } from './types/User'; 3 | 4 | export const currentUserKey = 'currentUser'; 5 | 6 | export async function getCurrentUser() { 7 | return BrowserStorage.get(currentUserKey); 8 | } 9 | -------------------------------------------------------------------------------- /src/shared/invariant.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Inspired by: https://www.npmjs.com/package/tiny-invariant 3 | */ 4 | export function invariant( 5 | value: T | false | null | undefined, 6 | message: string | (() => Error) = 'Assertion failed' 7 | ): asserts value { 8 | if (value === false || value == null) { 9 | if (typeof message === 'function') { 10 | throw message(); 11 | } else { 12 | throw new Error(message); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/shared/isEmail.ts: -------------------------------------------------------------------------------- 1 | export function isEmail(email?: string) { 2 | return email && /.+@.+/.test(email); 3 | } 4 | -------------------------------------------------------------------------------- /src/shared/isEthereumAddress.ts: -------------------------------------------------------------------------------- 1 | const ETHEREUM_ADDRESS_REGEXP = /^0x[a-fA-F0-9]{40}$/; 2 | 3 | export function isEthereumAddress(address: string) { 4 | return ETHEREUM_ADDRESS_REGEXP.test(address); 5 | } 6 | -------------------------------------------------------------------------------- /src/shared/isNumeric.ts: -------------------------------------------------------------------------------- 1 | export function isNumeric(n: number | string) { 2 | return !Number.isNaN(Number(n) - parseFloat(n as string)); 3 | } 4 | -------------------------------------------------------------------------------- /src/shared/isObj.ts: -------------------------------------------------------------------------------- 1 | export function isObj(x: unknown): x is Record { 2 | return typeof x === 'object' && x != null; 3 | } 4 | -------------------------------------------------------------------------------- /src/shared/normalizeAddress.ts: -------------------------------------------------------------------------------- 1 | export function normalizeAddress(address: string) { 2 | return address.startsWith('0x') ? address.toLowerCase() : address; 3 | } 4 | -------------------------------------------------------------------------------- /src/shared/normalizeChainId.ts: -------------------------------------------------------------------------------- 1 | import type { BigNumber } from '@ethersproject/bignumber'; 2 | import type { ChainId } from 'src/modules/ethereum/transactions/ChainId'; 3 | import { valueToHex } from './units/valueToHex'; 4 | 5 | export function normalizeChainId( 6 | value: string | number | bigint | BigNumber 7 | ): ChainId { 8 | return valueToHex(value).toLowerCase() as ChainId; 9 | } 10 | -------------------------------------------------------------------------------- /src/shared/openOnboarding.ts: -------------------------------------------------------------------------------- 1 | import browser from 'webextension-polyfill'; 2 | import { getPopupUrl } from 'src/shared/getPopupUrl'; 3 | import { setUrlContext } from './setUrlContext'; 4 | 5 | export function openOnboarding() { 6 | const popupUrl = getPopupUrl(); 7 | popupUrl.hash = '/onboarding'; 8 | setUrlContext(popupUrl.searchParams, { 9 | appMode: 'onboarding', 10 | windowType: 'tab', 11 | }); 12 | browser.tabs.create({ url: popupUrl.toString() }); 13 | } 14 | -------------------------------------------------------------------------------- /src/shared/packageVersion.ts: -------------------------------------------------------------------------------- 1 | import { version as packageVersion } from '../../package.json'; 2 | 3 | const isProd = process.env.NODE_ENV === 'production'; 4 | 5 | export const version = isProd ? packageVersion : `${packageVersion}-dev`; 6 | export const productionVersion = packageVersion; 7 | -------------------------------------------------------------------------------- /src/shared/rejectAfterDelay.ts: -------------------------------------------------------------------------------- 1 | export const rejectAfterDelay = (ms: number, requestName: string) => 2 | new Promise((_, reject) => 3 | setTimeout(() => reject(new Error(`Request timed out: ${requestName}`)), ms) 4 | ); 5 | -------------------------------------------------------------------------------- /src/shared/removeEmptyValues.ts: -------------------------------------------------------------------------------- 1 | export function removeEmptyValues(obj: T) { 2 | return Object.fromEntries( 3 | Object.entries(obj).filter(([_, value]) => value !== undefined) 4 | ) as T; 5 | } 6 | -------------------------------------------------------------------------------- /src/shared/sidepanel/SidepanelOptionsButton/index.ts: -------------------------------------------------------------------------------- 1 | export { SidepanelOptionsButton } from './SidepanelOptionsButton'; 2 | -------------------------------------------------------------------------------- /src/shared/sidepanel/initialize.background.ts: -------------------------------------------------------------------------------- 1 | import { initializeSidepanelCommands } from './sidepanel-commands.background'; 2 | 3 | export function initializeSidepanel() { 4 | initializeSidepanelCommands(); 5 | } 6 | -------------------------------------------------------------------------------- /src/shared/sidepanel/sidepanel-support.ts: -------------------------------------------------------------------------------- 1 | export function isSidepanelSupported() { 2 | return globalThis.chrome && 'sidePanel' in chrome; 3 | } 4 | -------------------------------------------------------------------------------- /src/shared/type-utils/Brand.ts: -------------------------------------------------------------------------------- 1 | export type Brand = T & { __kind__: TypeName }; 2 | -------------------------------------------------------------------------------- /src/shared/type-utils/OneOf.ts: -------------------------------------------------------------------------------- 1 | type ValueOf = Obj[keyof Obj]; 2 | type OneOnly = { 3 | [key in Exclude]?: undefined; 4 | } & { [key in K]: Obj[K] }; 5 | type OneOfByKey = { [key in keyof Obj]: OneOnly }; 6 | 7 | export type OneOf = ValueOf>; 8 | 9 | export type AtLeastOneOf = { 10 | [K in keyof T]: { [P in K]: T[P] } & { [P in Exclude]?: T[P] }; 11 | }[keyof T]; 12 | -------------------------------------------------------------------------------- /src/shared/type-utils/PartiallyOptional.ts: -------------------------------------------------------------------------------- 1 | export type PartiallyOptional = Omit & 2 | Partial>; 3 | -------------------------------------------------------------------------------- /src/shared/type-utils/PartiallyRequired.ts: -------------------------------------------------------------------------------- 1 | /** Makes passed fields required and all others optional (partial) */ 2 | export type PartiallyRequired = { 3 | [P in keyof T]?: T[P]; 4 | } & Required<{ 5 | [P in K]: NonNullable; 6 | }>; 7 | -------------------------------------------------------------------------------- /src/shared/types/AccountPublicRPC.ts: -------------------------------------------------------------------------------- 1 | export type { AccountPublicRPC } from 'src/background/account/Account'; 2 | -------------------------------------------------------------------------------- /src/shared/types/BareAddressPosition.ts: -------------------------------------------------------------------------------- 1 | import type { AddressPosition } from 'defi-sdk'; 2 | 3 | /** 4 | * satisfies AddressPosition | EmptyAddressPosition 5 | * EmptyAddressPosition is a type from @zeriontech/transactions 6 | */ 7 | export type BareAddressPosition = Pick< 8 | AddressPosition, 9 | 'id' | 'asset' | 'quantity' | 'chain' 10 | >; 11 | -------------------------------------------------------------------------------- /src/shared/types/BareWallet.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | BareWallet, 3 | BareMnemonicWallet, 4 | } from 'src/background/Wallet/model/BareWallet'; 5 | export type { MaskedBareWallet } from 'src/background/Wallet/model/BareWallet'; 6 | -------------------------------------------------------------------------------- /src/shared/types/ChannelContext.ts: -------------------------------------------------------------------------------- 1 | export interface ChannelContext { 2 | origin: string; 3 | tabId: number; 4 | } 5 | 6 | export interface PrivateChannelContext { 7 | origin: symbol; 8 | tabId: null; 9 | } 10 | -------------------------------------------------------------------------------- /src/shared/types/Device.ts: -------------------------------------------------------------------------------- 1 | export type { DeviceAccount } from 'src/background/Wallet/model/AccountContainer'; 2 | export type { Device } from 'src/background/Wallet/model/AccountContainer'; 3 | -------------------------------------------------------------------------------- /src/shared/types/ExternallyOwnedAccount.ts: -------------------------------------------------------------------------------- 1 | export type { ExternallyOwnedAccount } from 'src/background/Wallet/model/AccountContainer'; 2 | -------------------------------------------------------------------------------- /src/shared/types/GlobalPreferences.ts: -------------------------------------------------------------------------------- 1 | export { State as GlobalPreferences } from 'src/background/Wallet/GlobalPreferences'; 2 | -------------------------------------------------------------------------------- /src/shared/types/InDappNotification.ts: -------------------------------------------------------------------------------- 1 | export type InDappNotification = 2 | | { 3 | notificationEvent: 'chainChanged'; 4 | networkName: string; 5 | networkIcon: string; 6 | } 7 | | { 8 | notificationEvent: 'switchChainError'; 9 | chainId: string; 10 | }; 11 | -------------------------------------------------------------------------------- /src/shared/types/MemoryCacheRPC.ts: -------------------------------------------------------------------------------- 1 | export type { MemoryCacheRPC } from 'src/background/resource/memoryCacheRPC'; 2 | -------------------------------------------------------------------------------- /src/shared/types/MultichainTransaction.ts: -------------------------------------------------------------------------------- 1 | import type { SolTxSerializable } from 'src/modules/solana/SolTransaction'; 2 | import type { IncomingTransactionWithChainId } from 'src/modules/ethereum/types/IncomingTransaction'; 3 | import type { OneOf } from '../type-utils/OneOf'; 4 | 5 | export type MultichainTransaction< 6 | E extends IncomingTransactionWithChainId = IncomingTransactionWithChainId, 7 | S extends SolTxSerializable = SolTxSerializable 8 | > = OneOf<{ 9 | evm: E; 10 | solana: S; 11 | }>; 12 | -------------------------------------------------------------------------------- /src/shared/types/Permission.ts: -------------------------------------------------------------------------------- 1 | export type { Permission } from 'src/background/Wallet/model/types'; 2 | -------------------------------------------------------------------------------- /src/shared/types/SignTransactionResult.ts: -------------------------------------------------------------------------------- 1 | import type { SerializableTransactionResponse } from 'src/modules/ethereum/types/TransactionResponsePlain'; 2 | import type { SolSignTransactionResult } from 'src/modules/solana/transactions/SolTransactionResponse'; 3 | import type { OneOf } from '../type-utils/OneOf'; 4 | 5 | export type SignTransactionResult = OneOf<{ 6 | evm: SerializableTransactionResponse; 7 | solana: SolSignTransactionResult | SolSignTransactionResult[]; 8 | }>; 9 | -------------------------------------------------------------------------------- /src/shared/types/StringBase64.ts: -------------------------------------------------------------------------------- 1 | import type { Brand } from 'src/shared/type-utils/Brand'; 2 | export type StringBase64 = Brand; 3 | -------------------------------------------------------------------------------- /src/shared/types/UrlContext.ts: -------------------------------------------------------------------------------- 1 | export type AppMode = 'onboarding' | 'wallet'; 2 | export type WindowLayout = 'column' | 'page'; 3 | export type WindowType = 'popup' | 'tab' | 'dialog' | 'sidepanel'; 4 | 5 | export enum UrlContextParam { 6 | windowType = 'windowType', 7 | windowLayout = 'windowLayout', 8 | appMode = 'appMode', 9 | } 10 | 11 | export interface UrlContext { 12 | appMode: AppMode; 13 | windowType: WindowType; 14 | windowLayout: WindowLayout; 15 | } 16 | -------------------------------------------------------------------------------- /src/shared/types/User.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | id: string; 3 | salt: string; 4 | } 5 | 6 | export interface PublicUser { 7 | id: User['id']; 8 | } 9 | -------------------------------------------------------------------------------- /src/shared/types/Wallet.ts: -------------------------------------------------------------------------------- 1 | export type { Wallet } from 'src/background/Wallet/Wallet'; 2 | -------------------------------------------------------------------------------- /src/shared/types/WalletContainer.ts: -------------------------------------------------------------------------------- 1 | export type { WalletContainer } from 'src/background/Wallet/model/types'; 2 | -------------------------------------------------------------------------------- /src/shared/types/WalletGroup.ts: -------------------------------------------------------------------------------- 1 | export type { WalletGroup } from 'src/background/Wallet/model/types'; 2 | -------------------------------------------------------------------------------- /src/shared/types/WalletNameFlag.ts: -------------------------------------------------------------------------------- 1 | export { WalletNameFlag } from 'src/background/Wallet/model/WalletNameFlag'; 2 | -------------------------------------------------------------------------------- /src/shared/types/WalletRecord.ts: -------------------------------------------------------------------------------- 1 | export type { WalletRecord } from 'src/background/Wallet/model/types'; 2 | -------------------------------------------------------------------------------- /src/shared/types/button-events.ts: -------------------------------------------------------------------------------- 1 | // Shared event types for analytics 2 | 3 | export type ButtonScope = 'General' | 'Loaylty'; 4 | export type ButtonName = 5 | | 'Claim XP' 6 | | 'Rewards' 7 | | 'Invite Friends' 8 | | 'Rate Tooltip' 9 | | 'Quote List Bottom Description'; 10 | 11 | export interface ButtonClickedParams { 12 | pathname: string; 13 | buttonScope: ButtonScope; 14 | buttonName: ButtonName; 15 | walletAddress?: string; 16 | } 17 | -------------------------------------------------------------------------------- /src/shared/units/convert.ts: -------------------------------------------------------------------------------- 1 | import { BigNumber } from 'bignumber.js'; 2 | 3 | export function baseToCommon(value: BigNumber.Value, decimalPlaces: number) { 4 | return new BigNumber(value).shiftedBy(0 - decimalPlaces); 5 | } 6 | 7 | export function commonToBase(value: BigNumber.Value, decimalPlaces: number) { 8 | return new BigNumber(value).shiftedBy(decimalPlaces); 9 | } 10 | -------------------------------------------------------------------------------- /src/shared/units/formatCurrencyValue/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | formatCurrencyValue, 3 | formatCurrencyToParts, 4 | } from './formatCurrencyValue'; 5 | 6 | export { formatCurrencyValueExtra } from './formatCurrencyValueExtra'; 7 | -------------------------------------------------------------------------------- /src/shared/units/formatSeconds.ts: -------------------------------------------------------------------------------- 1 | export function formatSeconds(seconds: number) { 2 | const wholeMinutes = Math.floor(seconds / 60); 3 | const trailingSeconds = seconds - wholeMinutes * 60; 4 | 5 | if (seconds < 120) { 6 | return `${seconds} sec`; 7 | } else if (trailingSeconds === 0) { 8 | return `${wholeMinutes} min`; 9 | } else { 10 | return `${wholeMinutes} min ${trailingSeconds} sec`; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/shared/units/startOfDate.ts: -------------------------------------------------------------------------------- 1 | export function startOfDate(value: number) { 2 | const date = new Date(value); 3 | return new Date(date.getFullYear(), date.getMonth(), date.getDate()); 4 | } 5 | -------------------------------------------------------------------------------- /src/shared/units/toNumber.ts: -------------------------------------------------------------------------------- 1 | import { BigNumber } from 'bignumber.js'; 2 | 3 | export function toNumber(value: BigNumber.Value) { 4 | return value instanceof BigNumber ? value.toNumber() : Number(value); 5 | } 6 | -------------------------------------------------------------------------------- /src/shared/upsert.ts: -------------------------------------------------------------------------------- 1 | export function upsert( 2 | array: T[], 3 | newItem: T, 4 | getId: (item: T) => NonNullable 5 | ) { 6 | const pos = array.findIndex((item) => getId(item) === getId(newItem)); 7 | if (pos !== -1) { 8 | array.splice(pos, 1, newItem); 9 | } else { 10 | array.push(newItem); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/shared/validation/ValidationResult.ts: -------------------------------------------------------------------------------- 1 | export interface ValidationResult { 2 | valid: boolean; 3 | message: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/shared/validation/user-input.ts: -------------------------------------------------------------------------------- 1 | import type { ValidationResult } from './ValidationResult'; 2 | 3 | export const PASSWORD_MIN_LENGTH = 6; 4 | 5 | export function validate({ password }: { password: string }): ValidationResult { 6 | if (password.length < PASSWORD_MIN_LENGTH) { 7 | return { 8 | valid: false, 9 | message: 'Password must have at least 6 characters', 10 | }; 11 | } 12 | return { valid: true, message: '' }; 13 | } 14 | -------------------------------------------------------------------------------- /src/shared/wait.ts: -------------------------------------------------------------------------------- 1 | export async function wait(ms = 1000, result?: T) { 2 | return new Promise((resolve) => 3 | setTimeout(() => resolve(result as T), ms) 4 | ); 5 | } 6 | -------------------------------------------------------------------------------- /src/ui-lab/components/WindowSize/index.ts: -------------------------------------------------------------------------------- 1 | export { WindowSize } from './WindowSize'; 2 | -------------------------------------------------------------------------------- /src/ui-lab/defi-sdk/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from 'defi-sdk'; 2 | import { DEFI_SDK_API_URL, DEFI_SDK_API_TOKEN } from 'src/env/config'; 3 | 4 | export function configureClient() { 5 | if (!DEFI_SDK_API_URL || !DEFI_SDK_API_TOKEN) { 6 | throw new Error( 7 | 'DEFI_SDK_API_URL and DEFI_SDK_API_TOKEN must be defined in ENV' 8 | ); 9 | } 10 | client.configure({ 11 | url: DEFI_SDK_API_URL, 12 | apiToken: DEFI_SDK_API_TOKEN, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /src/ui-lab/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | UI Lab 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/ui-lab/lab.module.css: -------------------------------------------------------------------------------- 1 | body, 2 | :global(.ui-lab) { 3 | background-color: transparent; 4 | width: auto; 5 | } 6 | 7 | body { 8 | font-family: 'Aeonik Pro', sans-serif; 9 | font-size: 14px; 10 | line-height: calc(20 / 14); 11 | color: var(--black); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui-lab/parcel.lab.config: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@parcel/config-default", 3 | "transformers": { 4 | "jsx:*.svg": ["@parcel/transformer-svg-react"], 5 | "jsx:*": ["..."] 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /src/ui-lab/types/index.ts: -------------------------------------------------------------------------------- 1 | import type React from 'react'; 2 | 3 | export interface Readme { 4 | id: string; 5 | name: string; 6 | description: React.FunctionComponent | null; 7 | component: React.FunctionComponent; 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/App/index.ts: -------------------------------------------------------------------------------- 1 | export { App } from './App'; 2 | -------------------------------------------------------------------------------- /src/ui/DNA/components/styles.module.css: -------------------------------------------------------------------------------- 1 | .button { 2 | color: var(--always-black); 3 | background-color: var(--always-white); 4 | border-radius: 12px; 5 | padding-block: 8px; 6 | display: flex; 7 | justify-content: center; 8 | min-width: 104px; 9 | } 10 | 11 | @media (hover: hover) { 12 | .button:hover { 13 | color: #44444e; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/ui/DNA/pages/MintDnaFlow/index.ts: -------------------------------------------------------------------------------- 1 | export { MintDnaFlow } from './MintDnaFlow'; 2 | -------------------------------------------------------------------------------- /src/ui/DNA/pages/UpgradeDnaFlow/index.ts: -------------------------------------------------------------------------------- 1 | export { UpgradeDnaFlow } from './UpgradeDnaFlow'; 2 | -------------------------------------------------------------------------------- /src/ui/DNA/shared/Step.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as styles from './styles.module.css'; 3 | 4 | export function Step({ active }: { active: boolean }) { 5 | return ( 6 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/DNA/shared/constants.ts: -------------------------------------------------------------------------------- 1 | export const DNA_COLLECTION_ID = '23'; 2 | export const DNA_NFT_COLLECTION_ADDRESS = 3 | '0x932261f9fc8da46c4a22e31b45c4de60623848bf'; 4 | export const DNA_MINT_CONTRACT_ADDRESS = 5 | '0x932261f9fc8da46c4a22e31b45c4de60623848bf'; 6 | -------------------------------------------------------------------------------- /src/ui/assets/account.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/actionTypes/unknown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/add-circle-outlined.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/arrow-left-top.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/arrow-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/cancel-emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/cancel-emoji.png -------------------------------------------------------------------------------- /src/ui/assets/cancel-emoji@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/cancel-emoji@2x.png -------------------------------------------------------------------------------- /src/ui/assets/changed-assets-2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/ui/assets/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/chevron-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/coming-soon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/coming-soon@2x.png -------------------------------------------------------------------------------- /src/ui/assets/dots.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/info.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/lock-outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/lock.png -------------------------------------------------------------------------------- /src/ui/assets/new-window.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/no-results@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/no-results@2x.png -------------------------------------------------------------------------------- /src/ui/assets/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/portfolio.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/ui/assets/reverse.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/ui/assets/rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/rocket.png -------------------------------------------------------------------------------- /src/ui/assets/rocket@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/rocket@2x.png -------------------------------------------------------------------------------- /src/ui/assets/share.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/ui/assets/success_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/success_background.png -------------------------------------------------------------------------------- /src/ui/assets/trash.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/ui/assets/visible.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/assets/x-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/ui/assets/zer_coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/zer_coin.png -------------------------------------------------------------------------------- /src/ui/assets/zer_spark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/zer_spark.png -------------------------------------------------------------------------------- /src/ui/assets/zer_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/zer_star.png -------------------------------------------------------------------------------- /src/ui/assets/zerion-avatar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/assets/zerion-avatar@2x.png -------------------------------------------------------------------------------- /src/ui/components/Address/index.ts: -------------------------------------------------------------------------------- 1 | export { Address } from './Address'; 2 | -------------------------------------------------------------------------------- /src/ui/components/AddressBadge/index.ts: -------------------------------------------------------------------------------- 1 | export { AddressBadge } from './AddressBadge'; 2 | -------------------------------------------------------------------------------- /src/ui/components/AllowanceForm/index.tsx: -------------------------------------------------------------------------------- 1 | export { AllowanceForm } from './AllowanceForm'; 2 | -------------------------------------------------------------------------------- /src/ui/components/AllowanceView/index.ts: -------------------------------------------------------------------------------- 1 | export { AllowanceView } from './AllowanceView'; 2 | -------------------------------------------------------------------------------- /src/ui/components/AngleRightRow/index.ts: -------------------------------------------------------------------------------- 1 | export { AngleRightRow } from './AngleRightRow'; 2 | -------------------------------------------------------------------------------- /src/ui/components/AnimatedAppear/index.ts: -------------------------------------------------------------------------------- 1 | export { AnimatedAppear } from './AnimatedAppear'; 2 | -------------------------------------------------------------------------------- /src/ui/components/AssetIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { AssetIcon } from './AssetIcon'; 2 | -------------------------------------------------------------------------------- /src/ui/components/AssetLink/index.ts: -------------------------------------------------------------------------------- 1 | export { AssetLink, AssetAnchor } from './AssetLink'; 2 | -------------------------------------------------------------------------------- /src/ui/components/AssetQuantity/index.ts: -------------------------------------------------------------------------------- 1 | export { AssetQuantity } from './AssetQuantity'; 2 | -------------------------------------------------------------------------------- /src/ui/components/BackButton/index.ts: -------------------------------------------------------------------------------- 1 | export { BackButton } from './BackButton'; 2 | -------------------------------------------------------------------------------- /src/ui/components/Background/index.ts: -------------------------------------------------------------------------------- 1 | export { Background, useBackgroundKind } from './Background'; 2 | -------------------------------------------------------------------------------- /src/ui/components/BackupInfoNote/index.ts: -------------------------------------------------------------------------------- 1 | export { BackupInfoNote } from './BackupInfoNote'; 2 | -------------------------------------------------------------------------------- /src/ui/components/Badge/index.ts: -------------------------------------------------------------------------------- 1 | export { Badge } from './Badge'; 2 | -------------------------------------------------------------------------------- /src/ui/components/Badge/styles.module.css: -------------------------------------------------------------------------------- 1 | .badge { 2 | /* kinda make it behave like an inline-block, but without creating undesired line-height */ 3 | width: max-content; 4 | max-width: 100%; 5 | } 6 | 7 | .badgeContent { 8 | border-radius: 24px; 9 | padding: 4px 12px 4px 8px; 10 | border: 1px solid var(--neutral-500); 11 | background-color: var(--white); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/components/BlockchainTitleHelper/index.ts: -------------------------------------------------------------------------------- 1 | export { BlockchainTitleHelper } from './BlockchainTitleHelper'; 2 | -------------------------------------------------------------------------------- /src/ui/components/BlockieImg/index.ts: -------------------------------------------------------------------------------- 1 | export { BlockieImg } from './BlockieImg'; 2 | -------------------------------------------------------------------------------- /src/ui/components/BlurredToggle/index.ts: -------------------------------------------------------------------------------- 1 | export { BlurredToggle } from './BlurredToggle'; 2 | -------------------------------------------------------------------------------- /src/ui/components/BugReportButton/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | BugReportButton, 3 | FooterBugReportButton, 4 | BUTTON_HEIGHT as BUG_REPORT_BUTTON_HEIGHT, 5 | } from './BugReportButton'; 6 | -------------------------------------------------------------------------------- /src/ui/components/BugReportButton/styles.module.css: -------------------------------------------------------------------------------- 1 | .link { 2 | border-top: 1px solid var(--neutral-400); 3 | background-color: var(--neutral-200); 4 | color: var(--neutral-600); 5 | padding-block: 4; 6 | } 7 | 8 | @media (hover: hover) { 9 | .link:hover { 10 | color: var(--primary); 11 | background-color: var(--primary-200); 12 | border-top: 1px solid var(--primary-300); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/ui/components/CopyButton/index.ts: -------------------------------------------------------------------------------- 1 | export { CopyButton } from './CopyButton'; 2 | -------------------------------------------------------------------------------- /src/ui/components/DappIconFetcher/DappIconFetcher.tsx: -------------------------------------------------------------------------------- 1 | import { useFetchDappIcon } from './useFetchDappIcon'; 2 | 3 | type IconRenderer = (src: string | null) => JSX.Element; 4 | 5 | interface Props { 6 | url: string; 7 | render: IconRenderer; 8 | } 9 | 10 | export function DappIconFetcher({ url: dappUrl, render }: Props) { 11 | const { data: iconUrl, isLoading } = useFetchDappIcon(dappUrl); 12 | if (isLoading) { 13 | return render(null); 14 | } 15 | const src = iconUrl || `${dappUrl}/favicon.png`; 16 | return render(src); 17 | } 18 | -------------------------------------------------------------------------------- /src/ui/components/DappIconFetcher/index.ts: -------------------------------------------------------------------------------- 1 | export { DappIconFetcher } from './DappIconFetcher'; 2 | -------------------------------------------------------------------------------- /src/ui/components/DelayedRender/index.ts: -------------------------------------------------------------------------------- 1 | export { DelayedRender } from './DelayedRender'; 2 | -------------------------------------------------------------------------------- /src/ui/components/DesignTheme/index.ts: -------------------------------------------------------------------------------- 1 | export { DesignTheme } from './DesignTheme'; 2 | -------------------------------------------------------------------------------- /src/ui/components/EmptyView/index.ts: -------------------------------------------------------------------------------- 1 | export { EmptyView, EmptyView2 } from './EmptyView'; 2 | -------------------------------------------------------------------------------- /src/ui/components/EraseData/index.ts: -------------------------------------------------------------------------------- 1 | export { EraseDataInProgress } from './EraseDataInProgress'; 2 | export { EraseDataConfirmationDialog } from './EraseDataConfirmationDialog'; 3 | export { EraseDataListButton } from './EraseDataListButton'; 4 | export { useEraseDataMutation } from './useEraseDataMutation'; 5 | -------------------------------------------------------------------------------- /src/ui/components/EraseData/useEraseDataMutation.ts: -------------------------------------------------------------------------------- 1 | import type { MutateOptions } from '@tanstack/react-query'; 2 | import { useMutation } from '@tanstack/react-query'; 3 | import { accountPublicRPCPort } from 'src/ui/shared/channels'; 4 | 5 | export function useEraseDataMutation(options: MutateOptions) { 6 | return useMutation({ 7 | mutationFn: async () => { 8 | // artificial delay 9 | await new Promise((resolve) => setTimeout(resolve, 1500)); 10 | return accountPublicRPCPort.request('eraseAllData'); 11 | }, 12 | ...options, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /src/ui/components/ErrorBoundary/index.ts: -------------------------------------------------------------------------------- 1 | export { ErrorBoundary } from './ErrorBoundary'; 2 | -------------------------------------------------------------------------------- /src/ui/components/FiatInputValue/index.ts: -------------------------------------------------------------------------------- 1 | export { FiatInputValue } from './FiatInputValue'; 2 | -------------------------------------------------------------------------------- /src/ui/components/FillView/index.ts: -------------------------------------------------------------------------------- 1 | export { FillView } from './FillView'; 2 | -------------------------------------------------------------------------------- /src/ui/components/FillView/styles.module.css: -------------------------------------------------------------------------------- 1 | .adjustForNavigationBar > * { 2 | margin-top: calc(0px - var(--navigation-bar-height)); 3 | } 4 | -------------------------------------------------------------------------------- /src/ui/components/GasbackDecorated/index.ts: -------------------------------------------------------------------------------- 1 | export { GasbackDecorated } from './GasbackDecorated'; 2 | -------------------------------------------------------------------------------- /src/ui/components/GenericPrompt/index.ts: -------------------------------------------------------------------------------- 1 | export { GenericPrompt } from './GenericPrompt'; 2 | -------------------------------------------------------------------------------- /src/ui/components/GradientBorder/index.ts: -------------------------------------------------------------------------------- 1 | export { GradientBorder } from './GradientBorder'; 2 | -------------------------------------------------------------------------------- /src/ui/components/HandshakeFailure/index.ts: -------------------------------------------------------------------------------- 1 | export { HandshakeFailure } from './HandshakeFailure'; 2 | -------------------------------------------------------------------------------- /src/ui/components/KeyboardShortcut/index.ts: -------------------------------------------------------------------------------- 1 | export { KeyboardShortcut } from './KeyboardShortcut'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NFTLink/index.ts: -------------------------------------------------------------------------------- 1 | export { NFTLink } from './NFTLink'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NavigationBackButton/NavigationBackButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useGoBack } from 'src/ui/shared/navigation/useGoBack'; 3 | import { BackButton } from '../BackButton'; 4 | 5 | export function NavigationBackButton() { 6 | const goBack = useGoBack(); 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/components/NavigationBackButton/index.ts: -------------------------------------------------------------------------------- 1 | export { NavigationBackButton } from './NavigationBackButton'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NavigationBar/index.ts: -------------------------------------------------------------------------------- 1 | export { NavigationBar } from './NavigationBar'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NavigationTitle/index.ts: -------------------------------------------------------------------------------- 1 | export { NavigationTitle } from './NavigationTitle'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NetworkIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkIcon } from './NetworkIcon'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NetworkResetButton/NetworkResetButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { UnstyledButton } from 'src/ui/ui-kit/UnstyledButton'; 3 | import * as helperStyles from 'src/ui/style/helpers.module.css'; 4 | 5 | export function NetworkResetButton({ onClick }: { onClick: () => void }) { 6 | return ( 7 | 8 |
Show All Networks
9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /src/ui/components/NetworkResetButton/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkResetButton } from './NetworkResetButton'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NetworkSelectDialog/constants.ts: -------------------------------------------------------------------------------- 1 | export const LIST_ITEM_CLASS = 'network-list-item'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NetworkSelectDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkSelectDialog } from './NetworkSelectDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/components/NotFoundPage/NotFoundPage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { FillView } from '../FillView'; 3 | 4 | export function NotFoundPage() { 5 | return ( 6 | 7 |
8 |

404 not found

9 |
10 |
11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/components/NotFoundPage/index.ts: -------------------------------------------------------------------------------- 1 | export { NotFoundPage } from './NotFoundPage'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PageBottom/PageBottom.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Spacer } from 'src/ui/ui-kit/Spacer'; 3 | 4 | export function PageBottom() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/ui/components/PageBottom/index.ts: -------------------------------------------------------------------------------- 1 | export { PageBottom } from './PageBottom'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PageColumn/index.ts: -------------------------------------------------------------------------------- 1 | export { PageColumn, PAGE_PADDING_INLINE } from './PageColumn'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PageColumn/styles.module.css: -------------------------------------------------------------------------------- 1 | .column > * { 2 | flex-shrink: 0; 3 | } 4 | -------------------------------------------------------------------------------- /src/ui/components/PageFullBleedColumn/PageFullBleedColumn.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export function PageFullBleedColumn({ 4 | style, 5 | paddingInline, 6 | ...props 7 | }: React.HTMLProps & { paddingInline: boolean }) { 8 | return ( 9 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/ui/components/PageFullBleedColumn/index.ts: -------------------------------------------------------------------------------- 1 | export { PageFullBleedColumn } from './PageFullBleedColumn'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PageFullBleedLine/PageFullBleedLine.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { PAGE_PADDING_INLINE } from '../PageColumn'; 3 | 4 | export function PageFullBleedLine({ 5 | lineColor = 'var(--neutral-200)', 6 | style, 7 | ...props 8 | }: React.HTMLAttributes & { lineColor?: string }) { 9 | return ( 10 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/ui/components/PageFullBleedLine/index.ts: -------------------------------------------------------------------------------- 1 | export { PageFullBleedLine } from './PageFullBleedLine'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PageHeading/PageHeading.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { UIText } from 'src/ui/ui-kit/UIText'; 3 | 4 | export function PageHeading({ 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/components/PageHeading/index.ts: -------------------------------------------------------------------------------- 1 | export { PageHeading } from './PageHeading'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PageStickyFooter/index.ts: -------------------------------------------------------------------------------- 1 | export { PageStickyFooter } from './PageStickyFooter'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PageTop/PageTop.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Spacer } from 'src/ui/ui-kit/Spacer'; 3 | 4 | export function PageTop() { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/ui/components/PageTop/index.ts: -------------------------------------------------------------------------------- 1 | export { PageTop } from './PageTop'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PauseInjection/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | PauseInjectionControl, 3 | PausedHeader, 4 | usePausedData, 5 | } from './PauseInjection'; 6 | -------------------------------------------------------------------------------- /src/ui/components/PortalToRootNode/PortalToRootNode.tsx: -------------------------------------------------------------------------------- 1 | import { createPortal } from 'react-dom'; 2 | import { getRootDomNode } from 'src/ui/shared/getRootDomNode'; 3 | 4 | const rootNode = getRootDomNode(); 5 | 6 | export function PortalToRootNode({ children }: React.PropsWithChildren) { 7 | return createPortal(children, rootNode); 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/components/PortalToRootNode/index.ts: -------------------------------------------------------------------------------- 1 | export { PortalToRootNode } from './PortalToRootNode'; 2 | -------------------------------------------------------------------------------- /src/ui/components/Positions/types.ts: -------------------------------------------------------------------------------- 1 | export enum PositionsGroupType { 2 | platform = 'platform', 3 | position = 'position', 4 | } 5 | 6 | export const DEFAULT_PROTOCOL_ID = 'wallet'; 7 | export const DEFAULT_PROTOCOL_NAME = 'Wallet'; 8 | export const DEFAULT_NAME = 'ASSET'; 9 | -------------------------------------------------------------------------------- /src/ui/components/PrivacyFooter/index.ts: -------------------------------------------------------------------------------- 1 | export { PrivacyFooter } from './PrivacyFooter'; 2 | -------------------------------------------------------------------------------- /src/ui/components/PseudoRoute/PseudoRoute.tsx: -------------------------------------------------------------------------------- 1 | export function PseudoRoute({ 2 | when, 3 | component, 4 | }: { 5 | when: boolean; 6 | component: JSX.Element; 7 | }) { 8 | if (when) { 9 | return component; 10 | } 11 | return null; 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/components/PseudoRoute/index.ts: -------------------------------------------------------------------------------- 1 | export { PseudoRoute } from './PseudoRoute'; 2 | -------------------------------------------------------------------------------- /src/ui/components/SecretInput/index.ts: -------------------------------------------------------------------------------- 1 | export { SecretInput } from './SecretInput'; 2 | -------------------------------------------------------------------------------- /src/ui/components/ShuffleText/index.ts: -------------------------------------------------------------------------------- 1 | export { ShuffleText } from './ShuffleText'; 2 | -------------------------------------------------------------------------------- /src/ui/components/SignMessageButton/index.ts: -------------------------------------------------------------------------------- 1 | export { SignMessageButton } from './SignMessageButton'; 2 | export type { SignMsgBtnHandle } from './SignMessageButton'; 3 | -------------------------------------------------------------------------------- /src/ui/components/SignTransactionButton/ReadonlyWarningDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { WithReadonlyWarningDialog } from './ReadonlyWarningDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/components/SignTransactionButton/index.ts: -------------------------------------------------------------------------------- 1 | export { SignTransactionButton } from './SignTransactionButton'; 2 | export type { SendTxBtnHandle } from './SignTransactionButton'; 3 | -------------------------------------------------------------------------------- /src/ui/components/SiteFaviconImg/index.ts: -------------------------------------------------------------------------------- 1 | export { SiteFaviconImg } from './SiteFaviconImg'; 2 | -------------------------------------------------------------------------------- /src/ui/components/SlidingRectangle/index.ts: -------------------------------------------------------------------------------- 1 | export { SlidingRectangle } from './SlidingRectangle'; 2 | -------------------------------------------------------------------------------- /src/ui/components/Splash/index.ts: -------------------------------------------------------------------------------- 1 | export { Splash } from './Splash'; 2 | -------------------------------------------------------------------------------- /src/ui/components/TextPulse/TextPulse.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as styles from './styles.module.css'; 3 | 4 | export function TextPulse(props: React.HTMLProps) { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /src/ui/components/TextPulse/index.ts: -------------------------------------------------------------------------------- 1 | export { TextPulse } from './TextPulse'; 2 | -------------------------------------------------------------------------------- /src/ui/components/TextPulse/styles.module.css: -------------------------------------------------------------------------------- 1 | @keyframes pulse-color { 2 | from { 3 | color: var(--black); 4 | } 5 | 50% { 6 | color: var(--neutral-500); 7 | } 8 | to { 9 | color: var(--black); 10 | } 11 | } 12 | 13 | .pulse { 14 | animation: pulse-color 1.25s infinite; 15 | } 16 | -------------------------------------------------------------------------------- /src/ui/components/UIContext/UIContext.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export const defaultUIContextValue = { 4 | uiScrollRootElement: document.body, 5 | } as const; 6 | 7 | export const UIContext = React.createContext(defaultUIContextValue); 8 | -------------------------------------------------------------------------------- /src/ui/components/UIContext/index.ts: -------------------------------------------------------------------------------- 1 | export { UIContext, defaultUIContextValue } from './UIContext'; 2 | -------------------------------------------------------------------------------- /src/ui/components/URLBar/index.ts: -------------------------------------------------------------------------------- 1 | export { URLBar, NAVIGATION_BAR_HEIGHT } from './URLBar'; 2 | -------------------------------------------------------------------------------- /src/ui/components/VerifyUser/index.ts: -------------------------------------------------------------------------------- 1 | export { VerifyUser } from './VerifyUser'; 2 | -------------------------------------------------------------------------------- /src/ui/components/VersionUpgrade/index.ts: -------------------------------------------------------------------------------- 1 | export { VersionUpgrade } from './VersionUpgrade'; 2 | -------------------------------------------------------------------------------- /src/ui/components/ViewArea/ViewArea.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export function ViewArea({ 4 | style, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/ui/components/ViewArea/index.ts: -------------------------------------------------------------------------------- 1 | export { ViewArea } from './ViewArea'; 2 | -------------------------------------------------------------------------------- /src/ui/components/ViewError/index.ts: -------------------------------------------------------------------------------- 1 | export { ViewError } from './ViewError'; 2 | -------------------------------------------------------------------------------- /src/ui/components/ViewLoading/index.ts: -------------------------------------------------------------------------------- 1 | export { ViewLoading } from './ViewLoading'; 2 | -------------------------------------------------------------------------------- /src/ui/components/ViewSuspense/index.ts: -------------------------------------------------------------------------------- 1 | export { ViewSuspense } from './ViewSuspense'; 2 | -------------------------------------------------------------------------------- /src/ui/components/WalletAvatar/AvatarIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { AvatarIcon } from './AvatarIcon'; 2 | -------------------------------------------------------------------------------- /src/ui/components/WalletAvatar/index.ts: -------------------------------------------------------------------------------- 1 | export { WalletAvatar } from './WalletAvatar'; 2 | -------------------------------------------------------------------------------- /src/ui/components/WalletDisplayName/index.ts: -------------------------------------------------------------------------------- 1 | export { WalletDisplayName } from './WalletDisplayName'; 2 | -------------------------------------------------------------------------------- /src/ui/components/WalletMedia/index.ts: -------------------------------------------------------------------------------- 1 | export { WalletMedia, Composition } from './WalletMedia'; 2 | -------------------------------------------------------------------------------- /src/ui/components/WalletSourceIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { WalletSourceIcon } from './WalletSourceIcon'; 2 | -------------------------------------------------------------------------------- /src/ui/components/WarningIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { WarningIcon } from './WarningIcon'; 2 | -------------------------------------------------------------------------------- /src/ui/components/address-action/AddressActionDetails/index.ts: -------------------------------------------------------------------------------- 1 | export { AddressActionDetails } from './AddressActionDetails'; 2 | -------------------------------------------------------------------------------- /src/ui/components/address-action/ApplicationLine/index.ts: -------------------------------------------------------------------------------- 1 | export { ApplicationLine } from './ApplicationLine'; 2 | -------------------------------------------------------------------------------- /src/ui/components/address-action/EligibilityQuery.ts: -------------------------------------------------------------------------------- 1 | export interface EligibilityQuery { 2 | data?: null | { data: { eligible: boolean } }; 3 | status: 'error' | 'success' | 'loading'; 4 | isError: boolean; 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/components/address-action/RecipientLine/index.ts: -------------------------------------------------------------------------------- 1 | export { RecipientLine } from './RecipientLine'; 2 | -------------------------------------------------------------------------------- /src/ui/components/address-action/SingleAsset/index.ts: -------------------------------------------------------------------------------- 1 | export { SingleAsset } from './SingleAsset'; 2 | -------------------------------------------------------------------------------- /src/ui/components/address-action/TextLine/index.ts: -------------------------------------------------------------------------------- 1 | export { TextLine } from './TextLine'; 2 | -------------------------------------------------------------------------------- /src/ui/components/address-action/TransactionConfirmationView/index.ts: -------------------------------------------------------------------------------- 1 | export { TransactionConfirmationView } from './TransactionConfirmationView'; 2 | -------------------------------------------------------------------------------- /src/ui/components/address-action/TransactionSimulation/index.ts: -------------------------------------------------------------------------------- 1 | export { TransactionSimulation } from './TransactionSimulation'; 2 | -------------------------------------------------------------------------------- /src/ui/components/address-action/Transfers/index.ts: -------------------------------------------------------------------------------- 1 | export { Transfers } from './Transfers'; 2 | -------------------------------------------------------------------------------- /src/ui/features/appearance/AppearancePage/index.ts: -------------------------------------------------------------------------------- 1 | export { AppearancePage } from './AppearancePage'; 2 | -------------------------------------------------------------------------------- /src/ui/features/appearance/Theme.ts: -------------------------------------------------------------------------------- 1 | export enum Theme { 2 | light, 3 | dark, 4 | } 5 | -------------------------------------------------------------------------------- /src/ui/features/appearance/ThemeState.ts: -------------------------------------------------------------------------------- 1 | import type { Theme } from './Theme'; 2 | 3 | export interface ThemeState { 4 | theme: Theme; 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/features/appearance/ThemeStore.ts: -------------------------------------------------------------------------------- 1 | import { Store } from 'store-unit'; 2 | import { Theme } from './Theme'; 3 | import type { ThemeState } from './ThemeState'; 4 | 5 | export class ThemeStore extends Store { 6 | static isDark(state: ThemeState) { 7 | return state.theme === Theme.dark; 8 | } 9 | 10 | static isLight(state: ThemeState) { 11 | return state.theme === Theme.light; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/features/appearance/applyTheme.ts: -------------------------------------------------------------------------------- 1 | import s from 'src/ui/style/theme.module.css'; 2 | import { Theme } from './Theme'; 3 | 4 | export function applyTheme(theme: Theme) { 5 | if (theme === Theme.dark) { 6 | document.documentElement.classList.add(s['theme-dark']); 7 | } else { 8 | document.documentElement.classList.remove(s['theme-dark']); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/ui/features/appearance/index.ts: -------------------------------------------------------------------------------- 1 | import { followTheme } from './theme-store'; 2 | import { persist } from './persistence'; 3 | 4 | export * from './preference-store'; 5 | export * from './theme-store'; 6 | export * from './persistence'; 7 | export * from './Theme'; 8 | export * from './ThemeState'; 9 | export * from './ThemeStore'; 10 | 11 | export function initialize() { 12 | followTheme(); 13 | persist(); 14 | } 15 | -------------------------------------------------------------------------------- /src/ui/features/appearance/preference-store.ts: -------------------------------------------------------------------------------- 1 | import { Store } from 'store-unit'; 2 | import { retrieve } from './persistence'; 3 | 4 | export enum ThemePreference { 5 | system, 6 | light, 7 | dark, 8 | } 9 | 10 | export interface State { 11 | mode: ThemePreference; 12 | currency: string; 13 | } 14 | 15 | const initialState = { mode: ThemePreference.system, currency: 'usd' }; 16 | 17 | export const preferenceStore = new Store({ 18 | ...initialState, 19 | ...retrieve(), 20 | }); 21 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Backup/index.ts: -------------------------------------------------------------------------------- 1 | export { Backup } from './Backup'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/CreateUser/index.ts: -------------------------------------------------------------------------------- 1 | export { CreateUser } from './CreateUser'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/FAQ/index.ts: -------------------------------------------------------------------------------- 1 | export { PhraseFAQ, SecretKeyFAQ, SelectWalletsFAQ, PasswordFAQ } from './FAQ'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/FAQ/styles.module.css: -------------------------------------------------------------------------------- 1 | .faqIcon { 2 | border-radius: 20px; 3 | padding: 10px; 4 | width: 40px; 5 | height: 40px; 6 | background-color: var(--neutral-100); 7 | display: flex; 8 | } 9 | 10 | .faqButton:hover { 11 | color: var(--primary); 12 | text-decoration: underline; 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Hardware/hardwareSearchParams.ts: -------------------------------------------------------------------------------- 1 | export enum ViewParam { 2 | password = 'password', 3 | hardware = 'hardware', 4 | } 5 | 6 | export function assertViewParam(param: string): asserts param is ViewParam { 7 | if (param in ViewParam === false) { 8 | throw new Error('Unsupported view parameter'); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Hardware/index.ts: -------------------------------------------------------------------------------- 1 | export { Hardware } from './Hardware'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Import/ImportSearchParams.ts: -------------------------------------------------------------------------------- 1 | export enum ViewParam { 2 | password = 'password', 3 | secret = 'secret', 4 | 'select-wallets' = 'select-wallets', 5 | } 6 | 7 | export function assertViewParam(param: string): asserts param is ViewParam { 8 | if (param in ViewParam === false) { 9 | throw new Error('Unsupported view parameter'); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Import/Input.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cn from 'classnames'; 3 | import * as styles from './styles.module.css'; 4 | 5 | export const Input = React.forwardRef< 6 | HTMLInputElement, 7 | React.InputHTMLAttributes 8 | >(({ className, ...props }, ref) => { 9 | return ; 10 | }); 11 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Import/index.ts: -------------------------------------------------------------------------------- 1 | export { Import } from './Import'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Password/index.ts: -------------------------------------------------------------------------------- 1 | export { Password } from './Password'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Password/passwordSearchParams.ts: -------------------------------------------------------------------------------- 1 | export enum PasswordStep { 2 | create = 'create', 3 | warning = 'warning', 4 | confirm = 'confirm', 5 | } 6 | 7 | export function assertPasswordStep( 8 | param: string 9 | ): asserts param is PasswordStep { 10 | if (param in PasswordStep === false) { 11 | throw new Error('Unsupported step parameter'); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Success/CongratulationsWidget/index.ts: -------------------------------------------------------------------------------- 1 | export { CongratulationsWidget } from './CongratulationsWidget'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Success/CongratulationsWidget/styles.module.css: -------------------------------------------------------------------------------- 1 | .invitationBanner { 2 | background: var(--always-white); 3 | color: var(--always-black); 4 | padding: 16px 24px; 5 | border-radius: 20px; 6 | } 7 | 8 | .featureCard, 9 | .chartFeatureCard { 10 | background: #f5f5f7; 11 | } 12 | 13 | .chartFeatureCard { 14 | padding: 12px 0; 15 | } 16 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Success/ReferralCodeWidget/index.ts: -------------------------------------------------------------------------------- 1 | export { ReferralCodeWidget } from './ReferralCodeWidget'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Success/ReferralCodeWidget/styles.module.css: -------------------------------------------------------------------------------- 1 | .referralCodeForm { 2 | padding: 16px 24px; 3 | border: 1px solid var(--always-white); 4 | border-radius: 20px; 5 | } 6 | 7 | .gradientText { 8 | background: linear-gradient(90deg, #6c6cf9 0%, #ff7583 100%); 9 | -webkit-background-clip: text; 10 | -webkit-text-fill-color: transparent; 11 | background-clip: text; 12 | } 13 | 14 | .referralCodeInput { 15 | background-color: var(--always-white); 16 | color: var(--always-black); 17 | } 18 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Success/index.ts: -------------------------------------------------------------------------------- 1 | export { Success } from './Success'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/Welcome/index.ts: -------------------------------------------------------------------------------- 1 | export { Welcome } from './Welcome'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/dialog.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/key.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/metamask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/metamask.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/option_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/option_create.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/option_hardware.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/option_hardware.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/option_import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/option_import.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/option_secondary_create.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/session-expired.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/session-expired.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/wallet.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/wallet2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/wallet2.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/assets/welcome_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/features/onboarding/assets/welcome_background.png -------------------------------------------------------------------------------- /src/ui/features/onboarding/errors.ts: -------------------------------------------------------------------------------- 1 | export class OnboardingInterrupt extends Error {} 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/index.ts: -------------------------------------------------------------------------------- 1 | export { Onboarding } from './Onboarding'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/shared/PageLayout/index.ts: -------------------------------------------------------------------------------- 1 | export { PageLayout } from './PageLayout'; 2 | -------------------------------------------------------------------------------- /src/ui/features/onboarding/shared/SidePanel/index.ts: -------------------------------------------------------------------------------- 1 | export { SidePanel } from './SidePanel'; 2 | -------------------------------------------------------------------------------- /src/ui/features/preferences/index.ts: -------------------------------------------------------------------------------- 1 | export { usePreferences } from './usePreferences'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/EnterReferralCodeDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { EnterReferralCodeDialog } from './EnterReferralCodeDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/InviteFriendsBanner/index.ts: -------------------------------------------------------------------------------- 1 | export { InviteFriendsBanner } from './InviteFriendsBanner'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/InviteLinkDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { InviteLinkDialog } from './InviteLinkDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/InviteLinkDialog/styles.module.css: -------------------------------------------------------------------------------- 1 | .inviteUrlContainer { 2 | padding: 16px; 3 | grid-template-columns: 1fr auto; 4 | background: var(--neutral-100); 5 | border-radius: 20px; 6 | } 7 | 8 | .inviteUrl { 9 | text-align: center; 10 | overflow: hidden; 11 | text-overflow: ellipsis; 12 | white-space: nowrap; 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/QRCodeDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { QRCodeDialog } from './QRCodeDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/QRCodeDialog/styles.module.css: -------------------------------------------------------------------------------- 1 | .qrCode { 2 | display: flex; 3 | justify-content: center; 4 | align-items: center; 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/ReferralLinkDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { ReferralLinkDialog } from './ReferralLinkDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/ReferralLinkDialog/styles.module.css: -------------------------------------------------------------------------------- 1 | .referralLinkContainer { 2 | padding: 16px; 3 | grid-template-columns: 1fr auto; 4 | background: var(--neutral-100); 5 | border-radius: 20px; 6 | } 7 | 8 | .referralLink { 9 | text-align: center; 10 | overflow: hidden; 11 | text-overflow: ellipsis; 12 | white-space: nowrap; 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/SuccessDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { SuccessDialog } from './SuccessDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/SuccessDialog/styles.module.css: -------------------------------------------------------------------------------- 1 | .successDialog { 2 | max-width: var(--body-width); 3 | } 4 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/index.ts: -------------------------------------------------------------------------------- 1 | export { Invite } from './Invite'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/Circle/Circle.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | import { UIText } from 'src/ui/ui-kit/UIText'; 4 | import * as styles from './styles.module.css'; 5 | 6 | export function Circle({ 7 | children, 8 | className, 9 | ...props 10 | }: React.HTMLAttributes) { 11 | return ( 12 |
13 | {children} 14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/Circle/index.ts: -------------------------------------------------------------------------------- 1 | export { Circle } from './Circle'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/Circle/styles.module.css: -------------------------------------------------------------------------------- 1 | .circle { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | width: 24px; 6 | height: 24px; 7 | margin: 4px 0; 8 | border-radius: 50%; 9 | background: var(--black); 10 | color: var(--white); 11 | } 12 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/FeatureCard/index.ts: -------------------------------------------------------------------------------- 1 | export { FeatureCard } from './FeatureCard'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/FeatureCard/styles.module.css: -------------------------------------------------------------------------------- 1 | .featureCard { 2 | padding: 12px; 3 | border-radius: 12px; 4 | background: var(--neutral-100); 5 | justify-content: center; 6 | text-align: center; 7 | } 8 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/PremiumTrialBanner/index.ts: -------------------------------------------------------------------------------- 1 | export { PremiumTrialBanner } from './PremiumTrialBanner'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/PremiumTrialBanner/styles.module.css: -------------------------------------------------------------------------------- 1 | .premiumTrialBanner { 2 | position: relative; 3 | padding: 12px; 4 | } 5 | 6 | .gradientText { 7 | background: linear-gradient( 8 | 80deg, 9 | #cd657f 7.13%, 10 | #8a6df1 34.59%, 11 | #71a1f3 62.04%, 12 | #3bb1ed 90.33% 13 | ); 14 | -webkit-background-clip: text; 15 | -webkit-text-fill-color: transparent; 16 | background-clip: text; 17 | } 18 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/ReferrerLink/index.ts: -------------------------------------------------------------------------------- 1 | export { ReferrerLink } from './ReferrerLink'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/UnorderedListItem/UnorderedListItem.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { HStack } from 'src/ui/ui-kit/HStack'; 3 | import { UIText } from 'src/ui/ui-kit/UIText'; 4 | 5 | export function UnorderedListItem({ 6 | marker, 7 | text, 8 | }: { 9 | marker: React.ReactNode; 10 | text: React.ReactNode; 11 | }) { 12 | return ( 13 | 14 | {marker} 15 | {text} 16 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/UnorderedListItem/index.ts: -------------------------------------------------------------------------------- 1 | export { UnorderedListItem } from './UnorderedListItem'; 2 | -------------------------------------------------------------------------------- /src/ui/features/referral-program/shared/storage.ts: -------------------------------------------------------------------------------- 1 | import type { ReferrerData } from 'src/modules/zerion-api/requests/check-referral'; 2 | import { BrowserStorage } from 'src/background/webapis/storage'; 3 | 4 | const referrerKey = 'referral-program/referrer-2024-10-10'; 5 | 6 | export async function readSavedReferrerData() { 7 | return await BrowserStorage.get(referrerKey); 8 | } 9 | 10 | export async function saveReferrerData(referrerData: ReferrerData) { 11 | await BrowserStorage.set(referrerKey, referrerData); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/features/testnet-mode/DisableTestnetShortcuts/DisableTestnetShortcuts.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useId } from 'react'; 2 | import { testnetModeStore } from '../store'; 3 | 4 | export function DisableTestnetShortcuts() { 5 | const id = useId(); 6 | useEffect(() => { 7 | testnetModeStore.disable(id); 8 | return () => { 9 | testnetModeStore.enable(id); 10 | }; 11 | }, [id]); 12 | return null; 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/features/testnet-mode/DisableTestnetShortcuts/index.ts: -------------------------------------------------------------------------------- 1 | export { DisableTestnetShortcuts } from './DisableTestnetShortcuts'; 2 | -------------------------------------------------------------------------------- /src/ui/features/testnet-mode/MainnetOnlyWarningDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { WithMainnetOnlyWarningDialog } from './MainnetOnlyWarningDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/features/testnet-mode/TestModeDecoration/index.ts: -------------------------------------------------------------------------------- 1 | export { TestModeDecoration } from './TestModeDecoration'; 2 | -------------------------------------------------------------------------------- /src/ui/features/turnstile/events.ts: -------------------------------------------------------------------------------- 1 | import { createNanoEvents } from 'nanoevents'; 2 | 3 | export const emitter = createNanoEvents<{ 4 | openTurnstile: () => void; 5 | turnstileClosed: () => void; 6 | }>(); 7 | -------------------------------------------------------------------------------- /src/ui/features/turnstile/helpers.ts: -------------------------------------------------------------------------------- 1 | import { emitter } from './events'; 2 | 3 | export function openTurnstileWidgetIfNeeded(response: Response) { 4 | if (response.headers.get('cf-mitigated') === 'challenge') { 5 | emitter.emit('openTurnstile'); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/ui/features/turnstile/index.ts: -------------------------------------------------------------------------------- 1 | export { TurnstileTokenHandler } from './Turnstile'; 2 | -------------------------------------------------------------------------------- /src/ui/features/xp-drop/XpDrop.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route, Routes } from 'react-router-dom'; 3 | import { XpDropOnboarding } from './XpDropOnboarding'; 4 | import { XpDropClaimFlow } from './XpDropClaimFlow'; 5 | 6 | export function XpDrop() { 7 | return ( 8 | 9 | } /> 10 | } /> 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/features/xp-drop/XpDropClaimFlow/XpDropClaimFlow.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route, Routes } from 'react-router-dom'; 3 | import { XpDropClaim } from './XpDropClaim'; 4 | import { XpDropClaimSuccess } from './XpDropClaimSuccess'; 5 | 6 | export function XpDropClaimFlow() { 7 | return ( 8 | 9 | } /> 10 | } /> 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/features/xp-drop/XpDropClaimFlow/index.ts: -------------------------------------------------------------------------------- 1 | export { XpDropClaimFlow } from './XpDropClaimFlow'; 2 | -------------------------------------------------------------------------------- /src/ui/features/xp-drop/XpDropOnboarding/index.ts: -------------------------------------------------------------------------------- 1 | export { XpDropOnboarding } from './XpDropOnboarding'; 2 | -------------------------------------------------------------------------------- /src/ui/features/xp-drop/components/XpDropBanner/index.ts: -------------------------------------------------------------------------------- 1 | export { XpDropBanner } from './XpDropBanner'; 2 | -------------------------------------------------------------------------------- /src/ui/features/xp-drop/index.ts: -------------------------------------------------------------------------------- 1 | export { XpDrop } from './XpDrop'; 2 | -------------------------------------------------------------------------------- /src/ui/hardware-wallet/ConnectLedgerDevice/ConnectIllustration/index.ts: -------------------------------------------------------------------------------- 1 | export { ConnectIllustration } from './ConnectIllustration'; 2 | -------------------------------------------------------------------------------- /src/ui/hardware-wallet/ConnectLedgerDevice/index.ts: -------------------------------------------------------------------------------- 1 | export { ConnectLedgerDevice } from './ConnectLedgerDevice'; 2 | -------------------------------------------------------------------------------- /src/ui/hardware-wallet/ImportLedgerAddresses/index.ts: -------------------------------------------------------------------------------- 1 | export { ImportLedgerAddresses } from './ImportLedgerAddresses'; 2 | -------------------------------------------------------------------------------- /src/ui/hardware-wallet/LedgerIframe/index.ts: -------------------------------------------------------------------------------- 1 | export { LedgerIframe } from './LedgerIframe'; 2 | -------------------------------------------------------------------------------- /src/ui/hardware-wallet/SignConnector/index.ts: -------------------------------------------------------------------------------- 1 | export { SignConnector } from './SignConnector'; 2 | -------------------------------------------------------------------------------- /src/ui/hardware-wallet/assets/ledger-wire.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/ui/hardware-wallet/shared/errors.ts: -------------------------------------------------------------------------------- 1 | import { 2 | deniedByUser, 3 | isConnectError, 4 | interpretError, 5 | } from '@zeriontech/hardware-wallet-connection'; 6 | 7 | export function normalizeDeviceError(error: Error) { 8 | if (deniedByUser(error)) { 9 | return new Error('DeniedByUser'); 10 | } else if (isConnectError(error)) { 11 | return new Error('ConnectError'); 12 | } else { 13 | const message = interpretError(error); 14 | return Object.assign(new Error(message), error); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/ui/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | Zerion 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /src/ui/pages/AddEthereumChain/RpcUrlForm/index.ts: -------------------------------------------------------------------------------- 1 | export { RpcUrlForm } from './RpcUrlForm'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/AddEthereumChain/RpcUrlHelp/index.ts: -------------------------------------------------------------------------------- 1 | export { RpcUrlHelp } from './RpcUrlHelp'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/AddEthereumChain/index.ts: -------------------------------------------------------------------------------- 1 | export { AddEthereumChain } from './AddEthereumChain'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/AssetInfo/AssetChart/types.ts: -------------------------------------------------------------------------------- 1 | import type { AssetChartActions } from 'src/modules/zerion-api/requests/asset-get-chart'; 2 | import type { 3 | ChartPoint, 4 | ParsedChartPoint, 5 | } from 'src/ui/components/chart/types'; 6 | 7 | export type ParsedAssetChartPoint = ParsedChartPoint; 8 | export type AssetChartPoint = ChartPoint; 9 | -------------------------------------------------------------------------------- /src/ui/pages/AssetInfo/helpers.ts: -------------------------------------------------------------------------------- 1 | import { minus } from 'src/ui/shared/typography'; 2 | 3 | export function getColor(value?: number) { 4 | return !value 5 | ? 'var(--black)' 6 | : value > 0 7 | ? 'var(--positive-500)' 8 | : 'var(--negative-500)'; 9 | } 10 | 11 | export function getSign(value?: number) { 12 | return !value ? '' : value > 0 ? '+' : minus; 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/pages/AssetInfo/index.ts: -------------------------------------------------------------------------------- 1 | export { AssetInfo } from './AssetInfo'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Backup/Info/create_card_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/Backup/Info/create_card_1.png -------------------------------------------------------------------------------- /src/ui/pages/Backup/Info/create_card_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/Backup/Info/create_card_2.png -------------------------------------------------------------------------------- /src/ui/pages/Backup/Info/create_card_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/Backup/Info/create_card_3.png -------------------------------------------------------------------------------- /src/ui/pages/Backup/Info/index.ts: -------------------------------------------------------------------------------- 1 | export { Info } from './Info'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Backup/Info/styles.module.css: -------------------------------------------------------------------------------- 1 | .card { 2 | padding-bottom: 32px; 3 | border-radius: 20px; 4 | overflow: hidden; 5 | width: 338px; 6 | height: 288px; 7 | background-color: var(--primary-100); 8 | } 9 | 10 | .cardImg { 11 | width: 100%; 12 | object-fit: cover; 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/pages/Backup/Success/index.ts: -------------------------------------------------------------------------------- 1 | export { Success } from './Success'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Backup/VerifyUser/index.ts: -------------------------------------------------------------------------------- 1 | export { VerifyUser } from './VerifyUser'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Backup/VerifyUser/styles.module.css: -------------------------------------------------------------------------------- 1 | .faqIcon { 2 | border-radius: 20px; 3 | padding: 10px; 4 | width: 40px; 5 | height: 40px; 6 | background-color: var(--neutral-100); 7 | display: flex; 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/pages/Backup/clipboardWarning.ts: -------------------------------------------------------------------------------- 1 | import { SeedType } from 'src/shared/SeedType'; 2 | 3 | export const clipboardWarning = { 4 | getMessage: (seedType: SeedType) => { 5 | const secretName = 6 | seedType === SeedType.privateKey ? 'private key' : 'recovery phrase'; 7 | return `Did you save the ${secretName}?`; 8 | }, 9 | isWarningMessage: (value: string) => value.startsWith('Did you save'), 10 | }; 11 | -------------------------------------------------------------------------------- /src/ui/pages/Backup/index.ts: -------------------------------------------------------------------------------- 1 | export { BackupPage, BackupComponent } from './Backup'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/BridgeLine/index.ts: -------------------------------------------------------------------------------- 1 | export { BridgeLine } from './BridgeLine'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/LabeledNetworkSelect/index.ts: -------------------------------------------------------------------------------- 1 | export { LabeledNetworkSelect } from './LabeledNetworkSelect'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/LabeledNetworkSelect/styles.module.css: -------------------------------------------------------------------------------- 1 | .networkSelect { 2 | background-color: var(--neutral-100); 3 | border: 1px solid var(--neutral-100); 4 | border-radius: 8px; 5 | padding: 6px 16px; 6 | } 7 | 8 | @media (hover: hover) { 9 | .networkSelect:hover { 10 | border: 1px solid var(--neutral-400); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/QuoteList/index.ts: -------------------------------------------------------------------------------- 1 | export { QuoteList } from './QuoteList'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/QuoteList/styles.module.css: -------------------------------------------------------------------------------- 1 | .radio { 2 | position: relative; 3 | cursor: pointer; 4 | border: 1px solid var(--neutral-200); 5 | border-radius: 12px; 6 | padding: 12px; 7 | } 8 | 9 | .radio input[type='radio'] { 10 | border: 0; 11 | clip: rect(0 0 0 0); 12 | height: 1px; 13 | margin: -1px; 14 | overflow: hidden; 15 | padding: 0; 16 | position: absolute; 17 | width: 1px; 18 | } 19 | 20 | .radio:has(input[type='radio']:checked) { 21 | border: 1px solid var(--primary); 22 | padding: 12px; 23 | color: var(--primary); 24 | } 25 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/ReceiverAddressField/index.ts: -------------------------------------------------------------------------------- 1 | export { ReceiverAddressField } from './ReceiverAddressField'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/ReceiverAddressField/styles.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | background-color: var(--neutral-100); 3 | border: 1px solid var(--neutral-100); 4 | border-radius: 16px; 5 | } 6 | 7 | @media (hover: hover) { 8 | .container:hover { 9 | border: 1px solid var(--neutral-400); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/ReverseButton/index.ts: -------------------------------------------------------------------------------- 1 | export { ReverseButton } from './ReverseButton'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/SuccessState/index.ts: -------------------------------------------------------------------------------- 1 | export { SuccessState } from './SuccessState'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/ZerionFeeLine/index.ts: -------------------------------------------------------------------------------- 1 | export { ZerionFeeLine } from './ZerionFeeLine'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/fieldsets/ReceiveTokenField/index.ts: -------------------------------------------------------------------------------- 1 | export { ReceiveTokenField } from './ReceiveTokenField'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/fieldsets/SpendTokenField/index.ts: -------------------------------------------------------------------------------- 1 | export { SpendTokenField } from './SpendTokenField'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/BridgeForm/index.ts: -------------------------------------------------------------------------------- 1 | export { BridgeForm } from './BridgeForm'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/ConnectedSites/ConnectedSite/DisconnectFromDappButton/index.ts: -------------------------------------------------------------------------------- 1 | export { DisconnectFromDappButton } from './DisconnectFromDappButton'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/ConnectedSites/ConnectedSite/index.ts: -------------------------------------------------------------------------------- 1 | export { ConnectedSite } from './ConnectedSite'; 2 | export { ConnectedSiteDialog } from './ConnectedSiteDialog'; 3 | -------------------------------------------------------------------------------- /src/ui/pages/ConnectedSites/ConnectedSite/styles.module.css: -------------------------------------------------------------------------------- 1 | .siteLink { 2 | padding: 12px 18px 12px 8px; 3 | border-radius: 8px; 4 | } 5 | 6 | @media (hover: hover) { 7 | .siteLink:hover { 8 | background-color: var(--neutral-200); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/ui/pages/ConnectedSites/index.ts: -------------------------------------------------------------------------------- 1 | export { ConnectedSites } from './ConnectedSites'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/ConnectedSites/shared/isConnectableDapp.ts: -------------------------------------------------------------------------------- 1 | function isLocalhost(url: URL) { 2 | const { protocol, hostname } = url; 3 | const isHttp = protocol === 'https:' || protocol === 'http:'; 4 | return ( 5 | isHttp && 6 | (hostname === 'localhost' || 7 | hostname === '0.0.0.0' || 8 | hostname === '127.0.0.1') 9 | ); 10 | } 11 | 12 | export function isConnectableDapp(url: URL) { 13 | return url.protocol === 'https:' || isLocalhost(url); 14 | } 15 | -------------------------------------------------------------------------------- /src/ui/pages/ConnectedSites/shared/useRemovePermission.ts: -------------------------------------------------------------------------------- 1 | import { useMutation } from '@tanstack/react-query'; 2 | import { walletPort } from 'src/ui/shared/channels'; 3 | 4 | export function useRemovePermissionMutation({ 5 | onSuccess, 6 | }: { 7 | onSuccess?: () => void; 8 | }) { 9 | return useMutation({ 10 | mutationFn: ({ origin, address }: { origin: string; address?: string }) => { 11 | return walletPort.request('removePermission', { origin, address }); 12 | }, 13 | onSuccess, 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /src/ui/pages/CreateAccount/StrengthChecks/index.ts: -------------------------------------------------------------------------------- 1 | export { StrengthChecks } from './StrengthChecks'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/CreateAccount/StrengthIndicator/index.ts: -------------------------------------------------------------------------------- 1 | export { StrengthIndicator } from './StrengthIndicator'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/CreateAccount/index.ts: -------------------------------------------------------------------------------- 1 | export { CreateAccount } from './CreateAccount'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Feed/Ability/index.ts: -------------------------------------------------------------------------------- 1 | export { AbilityPage } from './AbilityPage'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Feed/index.ts: -------------------------------------------------------------------------------- 1 | export { Feed } from './Feed'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/ForgotPassword/index.ts: -------------------------------------------------------------------------------- 1 | export { ForgotPassword } from './ForgotPassword'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/AddReadonlyAddress/index.ts: -------------------------------------------------------------------------------- 1 | export { AddReadonlyAddress } from './AddReadonlyAddress'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/GenerateWallet/index.ts: -------------------------------------------------------------------------------- 1 | export { GenerateWallet } from './GenerateWallet'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/ImportWallet/MnemonicImportView/AddressImportFlow/AddressImportMessages/index.ts: -------------------------------------------------------------------------------- 1 | export { AddressImportMessages } from './AddressImportMessages'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/ImportWallet/MnemonicImportView/AddressImportFlow/WalletList/index.ts: -------------------------------------------------------------------------------- 1 | export { WalletList, WalletListPresentation } from './WalletList'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/ImportWallet/MnemonicImportView/AddressImportFlow/index.ts: -------------------------------------------------------------------------------- 1 | export { AddressImportFlow } from './AddressImportFlow'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/ImportWallet/MnemonicImportView/index.ts: -------------------------------------------------------------------------------- 1 | export { MnemonicImportView } from './MnemonicImportView'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/ImportWallet/PrivateKeyImportView/index.ts: -------------------------------------------------------------------------------- 1 | export { PrivateKeyImportView } from './PrivateKeyImportView'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/ImportWallet/index.ts: -------------------------------------------------------------------------------- 1 | export { ImportWallet } from './ImportWallet'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/components/TitleWithLine/index.ts: -------------------------------------------------------------------------------- 1 | export { TitleWithLine } from './TitleWithLine'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/GetStarted/index.ts: -------------------------------------------------------------------------------- 1 | export { GetStarted } from './GetStarted'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/HardwareWalletConnection/HardwareSignMessage/index.ts: -------------------------------------------------------------------------------- 1 | export { HardwareSignMessage } from './HardwareSignMessage'; 2 | export type { SignMessageHandle } from './HardwareSignMessage'; 3 | -------------------------------------------------------------------------------- /src/ui/pages/HardwareWalletConnection/HardwareSignTransaction/index.ts: -------------------------------------------------------------------------------- 1 | export { HardwareSignTransaction } from './HardwareSignTransaction'; 2 | export type { SignTransactionHandle } from './HardwareSignTransaction'; 3 | -------------------------------------------------------------------------------- /src/ui/pages/HardwareWalletConnection/ImportSuccess/index.ts: -------------------------------------------------------------------------------- 1 | export { ImportSuccess } from './ImportSuccess'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/HardwareWalletConnection/index.ts: -------------------------------------------------------------------------------- 1 | export { HardwareWalletConnection } from './HardwareWalletConnection'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/HardwareWalletConnection/shared/isAllowedMessage.ts: -------------------------------------------------------------------------------- 1 | export function isAllowedMessage( 2 | event: MessageEvent, 3 | targetIframeElement: HTMLIFrameElement 4 | ) { 5 | // NOTE: 6 | // Checking the origin of a sandboxed iframe: 7 | // https://web.dev/sandboxed-iframes/#safely_sandboxing_eval 8 | return ( 9 | event.origin === 'null' && 10 | event.source === targetIframeElement.contentWindow 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/pages/History/AccelerateTransactionDialog/CancelTx/index.ts: -------------------------------------------------------------------------------- 1 | export { CancelTx } from './CancelTx'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/History/AccelerateTransactionDialog/SpeedUp/index.ts: -------------------------------------------------------------------------------- 1 | export { SpeedUp } from './SpeedUp'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/History/AccelerateTransactionDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { AccelerateTransactionDialog } from './AccelerateTransactionDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/History/ActionDetailedView/index.ts: -------------------------------------------------------------------------------- 1 | export { ActionDetailedView } from './ActionDetailedView'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/History/ActionItem/index.ts: -------------------------------------------------------------------------------- 1 | export { ActionItem } from './ActionItem'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/History/ActionItem/styles.module.css: -------------------------------------------------------------------------------- 1 | .actionItemBackdropButton { 2 | position: absolute; 3 | top: -8px; 4 | right: -12px; 5 | bottom: -8px; 6 | left: -8px; 7 | z-index: 0; 8 | border-radius: 12px; 9 | } 10 | 11 | .actionItem > *:not(.actionItemBackdropButton) { 12 | z-index: 1; 13 | } 14 | 15 | .actionItem:hover .actionItemBackdropButton { 16 | background-color: var(--neutral-200); 17 | } 18 | -------------------------------------------------------------------------------- /src/ui/pages/History/ActionsList/index.ts: -------------------------------------------------------------------------------- 1 | export { ActionsList } from './ActionsList'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/History/index.ts: -------------------------------------------------------------------------------- 1 | export { HistoryList } from './History'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/History/isUnlimitedApproval.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | import { UNLIMITED_APPROVAL_AMOUNT } from 'src/modules/ethereum/constants'; 3 | 4 | export function isUnlimitedApproval(value?: BigNumber.Value | null) { 5 | return new BigNumber(value?.toString() || 0).gte(UNLIMITED_APPROVAL_AMOUNT); 6 | } 7 | -------------------------------------------------------------------------------- /src/ui/pages/Intro/Intro.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Navigate } from 'react-router-dom'; 3 | 4 | export function Intro() { 5 | return ( 6 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/pages/Intro/index.ts: -------------------------------------------------------------------------------- 1 | export { Intro } from './Intro'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Login/index.ts: -------------------------------------------------------------------------------- 1 | export { Login } from './Login'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/ManageWallets/WalletAccount/index.ts: -------------------------------------------------------------------------------- 1 | export { WalletAccount } from './WalletAccount'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/ManageWallets/WalletGroup/index.ts: -------------------------------------------------------------------------------- 1 | export { WalletGroup } from './WalletGroup'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/ManageWallets/index.ts: -------------------------------------------------------------------------------- 1 | export { ManageWallets } from './ManageWallets'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/ManageWallets/shared/groupByEcosystem.ts: -------------------------------------------------------------------------------- 1 | import groupBy from 'lodash/groupBy'; 2 | import type { WalletGroup } from 'src/shared/types/WalletGroup'; 3 | import { getAddressType } from 'src/shared/wallet/classifiers'; 4 | 5 | export function groupByEcosystem( 6 | wallets: WalletGroup['walletContainer']['wallets'] 7 | ) { 8 | return groupBy(wallets, (wallet) => getAddressType(wallet.address)) as Record< 9 | ReturnType, 10 | typeof wallets 11 | >; 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/NetworkCreateSuccess/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkCreateSuccess } from './NetworkCreateSuccess'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/NetworkForm/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkForm } from './NetworkForm'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/NetworkSelect/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkSelect } from './NetworkSelect'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/NetworkUpdateSuccess/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkUpdateSuccess } from './NetworkUpdateSuccess'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/index.ts: -------------------------------------------------------------------------------- 1 | export { Networks } from './Networks'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/shared/NetworkList/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkList } from './NetworkList'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/shared/SearchResults/index.ts: -------------------------------------------------------------------------------- 1 | export { SearchResults } from './SearchResults'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/shared/ValueCell/ValueCell.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { UIText } from 'src/ui/ui-kit/UIText'; 3 | import { VStack } from 'src/ui/ui-kit/VStack'; 4 | 5 | export function ValueCell({ label, value }: { label: string; value: string }) { 6 | return ( 7 | 8 | 9 | {label} 10 | 11 | 12 | {value} 13 | 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/shared/ValueCell/index.ts: -------------------------------------------------------------------------------- 1 | export { ValueCell } from './ValueCell'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Networks/shared/createEmptyChainConfig.ts: -------------------------------------------------------------------------------- 1 | import type { AddEthereumChainParameter } from 'src/modules/ethereum/types/AddEthereumChainParameter'; 2 | 3 | export const createEmptyChainConfig = (): AddEthereumChainParameter => ({ 4 | chainId: '', 5 | chainName: '', 6 | nativeCurrency: { 7 | decimals: 18, 8 | name: '', 9 | symbol: '', 10 | }, 11 | rpcUrls: [''], 12 | }); 13 | -------------------------------------------------------------------------------- /src/ui/pages/NonFungibleToken/getEntityUrl.ts: -------------------------------------------------------------------------------- 1 | import type { AddressNFT } from 'defi-sdk'; 2 | 3 | export function getNftEntityUrl(nft: AddressNFT) { 4 | return `/nft/${nft.chain}/${nft.contract_address}:${nft.token_id}`; 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/pages/NonFungibleToken/index.ts: -------------------------------------------------------------------------------- 1 | export { NonFungibleToken } from './NonFungibleToken'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Overview/ActionButtonsRow/index.ts: -------------------------------------------------------------------------------- 1 | export { ActionButtonsRow } from './ActionButtonsRow'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Overview/Banners/index.ts: -------------------------------------------------------------------------------- 1 | export { Banners } from './Banners'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Overview/ConnectionHeader/index.ts: -------------------------------------------------------------------------------- 1 | export { ConnectionHeader } from './ConnectionHeader'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Overview/NonFungibleTokens/index.ts: -------------------------------------------------------------------------------- 1 | export { NonFungibleTokens } from './NonFungibleTokens'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Overview/NonFungibleTokens/styles.module.css: -------------------------------------------------------------------------------- 1 | .mediaWrapper { 2 | border-radius: 19px; 3 | } 4 | 5 | @media (hover: hover) { 6 | .link:hover .mediaWrapper { 7 | outline: 2px solid var(--primary); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/ui/pages/Overview/Positions/index.ts: -------------------------------------------------------------------------------- 1 | export { Positions } from './Positions'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Overview/Positions/styles.module.css: -------------------------------------------------------------------------------- 1 | @keyframes appear { 2 | from { 3 | opacity: 0; 4 | transform: translateY(5px); 5 | } 6 | 1% { 7 | opacity: 0; 8 | transform: translateY(5px); 9 | } 10 | to { 11 | opacity: 1; 12 | transform: translateY(0) scale(1); 13 | } 14 | } 15 | 16 | .walletNameContent { 17 | animation: appear 150ms ease-in-out; 18 | animation-fill-mode: both; 19 | } 20 | 21 | @media (hover: hover) { 22 | .link:hover { 23 | color: var(--black); 24 | background-color: var(--neutral-100); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/ui/pages/Overview/index.ts: -------------------------------------------------------------------------------- 1 | export { Overview } from './Overview'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Receive/index.ts: -------------------------------------------------------------------------------- 1 | export { Receive } from './Receive'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/RequestAccounts/ChooseGlobalProvider/index.ts: -------------------------------------------------------------------------------- 1 | export { ChooseGlobalProvider } from './ChooseGlobalProvider'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/RequestAccounts/index.ts: -------------------------------------------------------------------------------- 1 | export { RequestAccounts } from './RequestAccounts'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/RevealPrivateKey/index.ts: -------------------------------------------------------------------------------- 1 | export { RevealPrivateKey } from './RevealPrivateKey'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/RevealPrivateKey/usePrivateKey.ts: -------------------------------------------------------------------------------- 1 | import { useQuery } from '@tanstack/react-query'; 2 | import { walletPort } from 'src/ui/shared/channels'; 3 | 4 | export function usePrivateKey(address: string) { 5 | return useQuery({ 6 | queryKey: ['getPrivateKey', address], 7 | queryFn: () => walletPort.request('getPrivateKey', { address }), 8 | useErrorBoundary: false, 9 | cacheTime: 0, 10 | refetchOnMount: false, 11 | refetchOnWindowFocus: false, 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/pages/RouteResolver/index.ts: -------------------------------------------------------------------------------- 1 | export { RouteResolver } from './RouteResolver'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Security/index.ts: -------------------------------------------------------------------------------- 1 | export { Security } from './Security'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/AssetSelect/index.ts: -------------------------------------------------------------------------------- 1 | export { AssetSelect } from './AssetSelect'; 2 | export type { Props } from './AssetSelect'; 3 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/AssetSelect/styles.module.css: -------------------------------------------------------------------------------- 1 | .select { 2 | color: var(--black); 3 | cursor: pointer; 4 | } 5 | 6 | @media (hover: hover) { 7 | .select:hover { 8 | color: var(--primary); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/SendTransactionConfirmation/index.ts: -------------------------------------------------------------------------------- 1 | export { SendTransactionConfirmation } from './SendTransactionConfirmation'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/SuccessState/index.ts: -------------------------------------------------------------------------------- 1 | export { SuccessState } from './SuccessState'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/fieldsets/AddressInput/index.ts: -------------------------------------------------------------------------------- 1 | export { AddressInput, AddressInputWrapper } from './AddressInput'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/fieldsets/NftTransferInput/index.ts: -------------------------------------------------------------------------------- 1 | export { NftTransferInput } from './NftTransferInput'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/fieldsets/NftTransferInput/styles.module.css: -------------------------------------------------------------------------------- 1 | .buttonOption { 2 | --nft-option-box-shadow: 0px 0px 0px 2px 3 | var(--box-backgound-color, var(--white)), 4 | 0px 0px 0px 4px var(--primary); 5 | } 6 | 7 | @media (hover: hover) { 8 | .buttonOption:hover { 9 | box-shadow: var(--nft-option-box-shadow); 10 | } 11 | } 12 | 13 | .highlighted { 14 | box-shadow: var(--nft-option-box-shadow); 15 | } 16 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/fieldsets/TokenTransferInput/index.ts: -------------------------------------------------------------------------------- 1 | export { TokenTransferInput } from './TokenTransferInput'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendForm/index.ts: -------------------------------------------------------------------------------- 1 | export { SendForm } from './SendForm'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NetworkFee/assets/custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/SendTransaction/NetworkFee/assets/custom.png -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NetworkFee/assets/custom_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/SendTransaction/NetworkFee/assets/custom_2x.png -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NetworkFee/assets/fast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/SendTransaction/NetworkFee/assets/fast.png -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NetworkFee/assets/fast_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/SendTransaction/NetworkFee/assets/fast_2x.png -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NetworkFee/assets/standard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/SendTransaction/NetworkFee/assets/standard.png -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NetworkFee/assets/standard_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/pages/SendTransaction/NetworkFee/assets/standard_2x.png -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NetworkFee/constants.ts: -------------------------------------------------------------------------------- 1 | import type { NetworkFeeSpeed } from '@zeriontech/transactions'; 2 | 3 | export const NETWORK_SPEED_TO_TITLE: Record = { 4 | fast: 'Fast', 5 | average: 'Average', 6 | custom: 'Custom', 7 | }; 8 | -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NetworkFee/index.ts: -------------------------------------------------------------------------------- 1 | export { NetworkFee } from './NetworkFee'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/NonceLine/index.ts: -------------------------------------------------------------------------------- 1 | export { NonceLine } from './NonceLine'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/TransactionAdvancedView/index.ts: -------------------------------------------------------------------------------- 1 | export { TransactionAdvancedView } from './TransactionAdvancedView'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/TransactionConfiguration/index.ts: -------------------------------------------------------------------------------- 1 | export { TransactionConfiguration } from './TransactionConfiguration'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/TransactionWarnings/index.ts: -------------------------------------------------------------------------------- 1 | export { TransactionWarnings } from './TransactionWarnings'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/UnknownIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { UnknownIcon } from './UnknownIcon'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SendTransaction/index.ts: -------------------------------------------------------------------------------- 1 | export { SendTransaction } from './SendTransaction'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Settings/PopoverToast/index.ts: -------------------------------------------------------------------------------- 1 | export { PopoverToast, PopoverToastHandle } from './PopoverToast'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Settings/SettingsLinkIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { SettingsLinkIcon } from './SettingsLinkIcon'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Settings/index.ts: -------------------------------------------------------------------------------- 1 | export { Settings } from './Settings'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/Settings/useSettingsTodosCount.ts: -------------------------------------------------------------------------------- 1 | import { useBackupTodosCount } from 'src/ui/shared/requests/useBackupTodosCount'; 2 | 3 | export function useSettingsTodosCount() { 4 | return useBackupTodosCount(); 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/pages/SignMessage/index.ts: -------------------------------------------------------------------------------- 1 | export { SignMessage } from './SignMessage'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SignTypedData/TypedDataAdvancedView/index.ts: -------------------------------------------------------------------------------- 1 | export { TypedDataAdvancedView } from './TypedDataAdvancedView'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SignTypedData/index.ts: -------------------------------------------------------------------------------- 1 | export { SignTypedData } from './SignTypedData'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/ApproveHintLine/index.ts: -------------------------------------------------------------------------------- 1 | export { ApproveHintLine } from './ApproveHintLine'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/Quotes/FeeTier.ts: -------------------------------------------------------------------------------- 1 | export type FeeTier = 'regular' | 'premium' | 'og'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/Quotes/index.ts: -------------------------------------------------------------------------------- 1 | export { RateLine } from './RateLine'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/SlippageSettings/index.ts: -------------------------------------------------------------------------------- 1 | export { SlippageSettings } from './SlippageSettings'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/SuccessState/index.ts: -------------------------------------------------------------------------------- 1 | export { SuccessState } from './SuccessState'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/fieldsets/ReceiveTokenField/MarketAssetSelect/index.ts: -------------------------------------------------------------------------------- 1 | export { MarketAssetSelect } from './MarketAssetSelect'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/fieldsets/ReceiveTokenField/index.ts: -------------------------------------------------------------------------------- 1 | export { ReceiveTokenField } from './ReceiveTokenField'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/fieldsets/SpendTokenField/index.ts: -------------------------------------------------------------------------------- 1 | export { SpendTokenField } from './SpendTokenField'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/index.ts: -------------------------------------------------------------------------------- 1 | export { SwapForm } from './SwapForm'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwapForm/shared/PriceImpactLine/index.ts: -------------------------------------------------------------------------------- 1 | export { PriceImpactLine } from './PriceImpactLine'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/SwitchEthereumChain/index.ts: -------------------------------------------------------------------------------- 1 | export { SwitchEthereumChain } from './SwitchEthereumChain'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/TestnetModeGuard/index.ts: -------------------------------------------------------------------------------- 1 | export { TestnetModeGuard } from './TestnetModeGuard'; 2 | -------------------------------------------------------------------------------- /src/ui/pages/WalletSelect/index.ts: -------------------------------------------------------------------------------- 1 | export { WalletSelect } from './WalletSelect'; 2 | -------------------------------------------------------------------------------- /src/ui/shared/StoreWatcher.ts: -------------------------------------------------------------------------------- 1 | import type { Store } from 'store-unit'; 2 | import { useStore } from '@store-unit/react'; 3 | 4 | export function StoreWatcher({ 5 | store, 6 | render, 7 | }: { 8 | store: Store; 9 | render: (state: T) => React.ReactNode; 10 | }) { 11 | const state = useStore(store); 12 | return render(state); 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/shared/focusNode.ts: -------------------------------------------------------------------------------- 1 | export function focusNode(node: T | null) { 2 | node?.focus(); 3 | } 4 | -------------------------------------------------------------------------------- /src/ui/shared/forms/SuccessState/error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/ui/shared/forms/SuccessState/success.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ui/shared/forms/inputs.ts: -------------------------------------------------------------------------------- 1 | export const FLOAT_INPUT_PATTERN = '(\\d+\\.)?\\d+'; // positive floats and ints 2 | export const INT_INPUT_PATTERN = '\\d+'; 3 | -------------------------------------------------------------------------------- /src/ui/shared/forms/useCustomValidity.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | export function useCustomValidity({ 4 | ref, 5 | customValidity, 6 | }: { 7 | ref: React.RefObject; 8 | customValidity: string; 9 | }) { 10 | useEffect(() => { 11 | if (ref.current) { 12 | ref.current.setCustomValidity(customValidity); 13 | } 14 | }, [customValidity, ref]); 15 | } 16 | -------------------------------------------------------------------------------- /src/ui/shared/getDocumentTitle.ts: -------------------------------------------------------------------------------- 1 | export function getDocumentTitle(pageTitle?: string | null) { 2 | if (!pageTitle) { 3 | return 'Zerion'; 4 | } 5 | return `Zerion · ${pageTitle}`; 6 | } 7 | -------------------------------------------------------------------------------- /src/ui/shared/getGroupDisplayName.ts: -------------------------------------------------------------------------------- 1 | import { emojify } from './getWalletDisplayName'; 2 | 3 | export function getGroupDisplayName(name: string) { 4 | return emojify(name); 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/shared/getRootDomNode.ts: -------------------------------------------------------------------------------- 1 | import { invariant } from 'src/shared/invariant'; 2 | 3 | export function getRootDomNode() { 4 | const root = document.getElementById('root'); 5 | invariant(root, 'Root element must be in DOM'); 6 | return root; 7 | } 8 | -------------------------------------------------------------------------------- /src/ui/shared/intersperce.ts: -------------------------------------------------------------------------------- 1 | export function intersperce( 2 | arr: (T | null | undefined)[], 3 | getJoiner: (key: number, index: number) => T 4 | ): T[] { 5 | const result: T[] = []; 6 | let index = 0; 7 | for (const el of arr) { 8 | if (el == null) { 9 | continue; 10 | } 11 | if (index > 0 && result.length) { 12 | result.push(getJoiner(index * -1, index)); 13 | } 14 | result.push(el); 15 | index++; 16 | } 17 | return result; 18 | } 19 | -------------------------------------------------------------------------------- /src/ui/shared/isSessionExpiredError.ts: -------------------------------------------------------------------------------- 1 | import { getError } from 'src/shared/errors/getError'; 2 | 3 | export function isSessionExpiredError(error: unknown) { 4 | return getError(error).message === 'Session expired'; 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/shared/middleTruncate.ts: -------------------------------------------------------------------------------- 1 | import { ellipsis } from './typography'; 2 | 3 | export const middleTruncate = ({ 4 | value, 5 | leadingLettersCount = 3, 6 | trailingLettersCount = 6, 7 | }: { 8 | value: string; 9 | leadingLettersCount?: number; 10 | trailingLettersCount?: number; 11 | }) => 12 | value.length > leadingLettersCount + trailingLettersCount 13 | ? `${value.slice(0, leadingLettersCount)}${ellipsis}${value.slice( 14 | -trailingLettersCount 15 | )}` 16 | : value; 17 | -------------------------------------------------------------------------------- /src/ui/shared/navigation/getBackOrHome.ts: -------------------------------------------------------------------------------- 1 | export function getBackOrHome(): number | string { 2 | if ('navigation' in window) { 3 | const { currentEntry } = window.navigation; 4 | const entries = window.navigation.entries(); 5 | if (entries.length === 1 || entries[0] === currentEntry) { 6 | return '/'; 7 | } else { 8 | return -1; 9 | } 10 | } else { 11 | return -1; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/shared/navigation/useGoBack.ts: -------------------------------------------------------------------------------- 1 | import { useNavigate } from 'react-router-dom'; 2 | import { useEvent } from '../useEvent'; 3 | import { getBackOrHome } from './getBackOrHome'; 4 | 5 | export function useGoBack() { 6 | const navigate = useNavigate(); 7 | return useEvent(() => navigate(getBackOrHome() as number)); 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/shared/openInNewWindow.ts: -------------------------------------------------------------------------------- 1 | import browser from 'webextension-polyfill'; 2 | 3 | export function openInNewWindow( 4 | event: React.MouseEvent 5 | ) { 6 | event.preventDefault(); 7 | browser.windows.create({ 8 | url: event.currentTarget.getAttribute('href') as string, 9 | width: 600, 10 | height: 800, 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/shared/openInTabIfInSidepanel.ts: -------------------------------------------------------------------------------- 1 | import { urlContext } from 'src/shared/UrlContext'; 2 | import { openHref } from './openUrl'; 3 | 4 | export function openHrefInTabIfSidepanel(event: React.MouseEvent) { 5 | if (urlContext.windowType === 'sidepanel') { 6 | // Bugfix: this is used to fix a bug where clicking external links while in sidepanel 7 | // reloads the UI 8 | // {openHref} will preventDefault the event and create browser tab via extension api 9 | openHref(event); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/ui/shared/prepareForHref.ts: -------------------------------------------------------------------------------- 1 | export function prepareForHref(value: string | URL) { 2 | const url = value instanceof URL ? value : new URL(value); 3 | if (url.protocol === 'https:' || url.protocol === 'http:') { 4 | return url; 5 | } else { 6 | return null; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/shared/prepareUserInputSeedOrPrivateKey.ts: -------------------------------------------------------------------------------- 1 | import { maybeNormalizeSolanaPrivateKey } from 'src/modules/solana/shared'; 2 | 3 | export function prepareUserInputSeedOrPrivateKey(value: string) { 4 | const string = (value as string).trim().replace(/\s+/g, ' '); 5 | return maybeNormalizeSolanaPrivateKey(string); 6 | } 7 | -------------------------------------------------------------------------------- /src/ui/shared/requests/PortfolioValue/ChainValue/index.ts: -------------------------------------------------------------------------------- 1 | export type { ChainDistribution } from './ChainValue'; 2 | export { ChainValue } from './ChainValue'; 3 | -------------------------------------------------------------------------------- /src/ui/shared/requests/PortfolioValue/index.ts: -------------------------------------------------------------------------------- 1 | export { PortfolioValue } from './PortfolioValue'; 2 | -------------------------------------------------------------------------------- /src/ui/shared/requests/getActiveTabOrigin.ts: -------------------------------------------------------------------------------- 1 | import browser from 'webextension-polyfill'; 2 | 3 | export async function getActiveTabOrigin() { 4 | const tabs = await browser.tabs.query({ active: true, currentWindow: true }); 5 | const tab = tabs.find((tab) => tab.url); 6 | if (tab && tab.url) { 7 | const url = new URL(tab.url); 8 | return { url, tabOrigin: url.origin, tab }; 9 | } else { 10 | return null; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/shared/requests/getWalletGroupByAddress.ts: -------------------------------------------------------------------------------- 1 | import { walletPort } from 'src/ui/shared/channels'; 2 | 3 | export function getWalletGroupByAddress(address: string) { 4 | return walletPort.request('getWalletGroupByAddress', { address }); 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/shared/requests/premium/isPremiumMembership.ts: -------------------------------------------------------------------------------- 1 | import type { AddressMembership } from 'defi-sdk'; 2 | 3 | export function isPremiumMembership(info?: AddressMembership | null) { 4 | return Boolean( 5 | info?.premium && 6 | (info.premium.expiration_time === null || 7 | new Date(info.premium.expiration_time).getTime() > Date.now()) 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /src/ui/shared/requests/requestChainForOrigin.ts: -------------------------------------------------------------------------------- 1 | import { createChain } from 'src/modules/networks/Chain'; 2 | import type { BlockchainType } from 'src/shared/wallet/classifiers'; 3 | import { walletPort } from 'src/ui/shared/channels'; 4 | 5 | export function requestChainForOrigin( 6 | tabOrigin: string, 7 | standard: BlockchainType 8 | ) { 9 | return walletPort 10 | .request('requestChainForOrigin', { origin: tabOrigin, standard }) 11 | .then((chain) => createChain(chain)); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/shared/requests/setCurrentAddress.ts: -------------------------------------------------------------------------------- 1 | import { walletPort } from 'src/ui/shared/channels'; 2 | import { emitter } from '../events'; 3 | 4 | export async function setCurrentAddress({ address }: { address: string }) { 5 | return walletPort.request('setCurrentAddress', { address }).then((result) => { 6 | emitter.emit('uiAccountsChanged'); 7 | return result; 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /src/ui/shared/requests/useBackupTodosCount.ts: -------------------------------------------------------------------------------- 1 | import { useQuery } from '@tanstack/react-query'; 2 | import { walletPort } from 'src/ui/shared/channels'; 3 | 4 | function useNoBackupCount() { 5 | return useQuery({ 6 | queryKey: ['wallet/getNoBackupCount'], 7 | queryFn: () => { 8 | return walletPort.request('getNoBackupCount'); 9 | }, 10 | useErrorBoundary: true, 11 | }); 12 | } 13 | export function useBackupTodosCount() { 14 | const { data: count } = useNoBackupCount(); 15 | return count ?? 0; 16 | } 17 | -------------------------------------------------------------------------------- /src/ui/shared/routing/ProgrammaticNavigationHelper/index.ts: -------------------------------------------------------------------------------- 1 | export { ProgrammaticNavigationHelper } from './ProgrammaticNavigationHelper'; 2 | -------------------------------------------------------------------------------- /src/ui/shared/routing/helpers.ts: -------------------------------------------------------------------------------- 1 | import { emitter } from '../events'; 2 | 3 | export function navigateProgrammatically(params: { pathname: string }) { 4 | emitter.emit('navigationRequest', params); 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/shared/security-check/index.ts: -------------------------------------------------------------------------------- 1 | export { DappSecurityCheck } from './DappSecurityCheck'; 2 | export { 3 | InterpretationSecurityCheck, 4 | hasCriticalWarning, 5 | } from './InterpertationSecurityCheck'; 6 | export { SecurityStatusBackground } from './SecurityStatusButton'; 7 | -------------------------------------------------------------------------------- /src/ui/shared/setURLSearchParams.ts: -------------------------------------------------------------------------------- 1 | /** Creates new URLSearchParams instance, new keys overwrite existing ones */ 2 | export function setURLSearchParams( 3 | params: URLSearchParams, 4 | values: Record 5 | ) { 6 | const newParams = new URLSearchParams(params); 7 | for (const key in values) { 8 | newParams.set(key, values[key]); 9 | } 10 | return newParams; 11 | } 12 | -------------------------------------------------------------------------------- /src/ui/shared/truncateAddress.ts: -------------------------------------------------------------------------------- 1 | import { ellipsis } from './typography'; 2 | 3 | export function truncateAddress(address: string, padding = 6) { 4 | const leadingPadding = address.startsWith('0x') ? 2 + padding : padding; 5 | return `${address.slice(0, leadingPadding)}${ellipsis}${address.slice( 6 | 0 - padding 7 | )}`; 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/shared/typography.ts: -------------------------------------------------------------------------------- 1 | export const noValueDash = '—'; 2 | export const emDash = '—'; 3 | export const minus = '\u2212'; // '−'; // \u2212 4 | export const apostrophe = '’'; 5 | export const ellipsis = '…'; 6 | export const NBSP = '\u00a0'; 7 | export const muchGreater = '≫'; 8 | export const veryMuchGreater = '⋙'; 9 | export const almostEqual = '\u2248'; 10 | export const middot = '·'; 11 | -------------------------------------------------------------------------------- /src/ui/shared/updateSearchParam.ts: -------------------------------------------------------------------------------- 1 | export function updateSearchParam(key: string, value: string) { 2 | return (prev: URLSearchParams) => { 3 | const newParams = new URLSearchParams(prev); 4 | newParams.set(key, value); 5 | return newParams; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /src/ui/shared/useDebouncedCallback.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useMemo } from 'react'; 2 | import debounce from 'lodash/debounce'; 3 | 4 | export function useDebouncedCallback( 5 | callback: (...args: T[]) => K, 6 | delay: number 7 | ) { 8 | const debouncedCallback = useMemo( 9 | () => debounce(callback, delay), 10 | [callback, delay] 11 | ); 12 | useEffect(() => { 13 | return debouncedCallback.cancel; 14 | }, [debouncedCallback.cancel]); 15 | return debouncedCallback; 16 | } 17 | -------------------------------------------------------------------------------- /src/ui/shared/useErrorBoundary.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useState } from 'react'; 2 | import { getError } from 'src/shared/errors/getError'; 3 | 4 | export function useErrorBoundary() { 5 | const [_, setState] = useState(); 6 | return useCallback( 7 | (error: unknown) => 8 | setState(() => { 9 | throw getError(error); 10 | }), 11 | [] 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/ui/shared/useEvent.ts: -------------------------------------------------------------------------------- 1 | import { useLayoutEffect, useRef, useCallback } from 'react'; 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 4 | type AnyFunction = (...args: any[]) => any; 5 | 6 | export function useEvent(callback: T) { 7 | const ref = useRef(callback); 8 | useLayoutEffect(() => { 9 | ref.current = callback; 10 | }); 11 | return useCallback((...args) => { 12 | return ref.current(...args); 13 | }, []) as T; 14 | } 15 | -------------------------------------------------------------------------------- /src/ui/shared/wallet/signMessage.ts: -------------------------------------------------------------------------------- 1 | import { toUtf8Bytes, hexlify } from 'ethers'; 2 | import { INTERNAL_ORIGIN } from 'src/background/constants'; 3 | import { walletPort } from 'src/ui/shared/channels'; 4 | 5 | export async function signMessage(message: string, clientScope: string | null) { 6 | const signingMessage = hexlify(toUtf8Bytes(message)); 7 | return walletPort.request('personalSign', { 8 | params: [signingMessage], 9 | initiator: INTERNAL_ORIGIN, 10 | clientScope, 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/shared/zeroize-submission.ts: -------------------------------------------------------------------------------- 1 | import { queryClient } from './requests/queryClient'; 2 | 3 | export function zeroizeAfterSubmission() { 4 | /** Call this function to remove sensitive input values from runtime memory */ 5 | const inputs = document.querySelectorAll('input[type=password]'); 6 | inputs.forEach((input) => { 7 | if (input instanceof HTMLInputElement) { 8 | input.value = ''; 9 | } 10 | }); 11 | queryClient.getMutationCache().clear(); 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/style/fonts.module.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Aeonik Pro'; 3 | src: url('./fonts/AeonikPro-Regular.woff2') format('woff2'), 4 | url('./fonts/AeonikPro-Regular.woff') format('woff'); 5 | font-weight: normal; 6 | font-style: normal; 7 | } 8 | 9 | @font-face { 10 | font-family: 'Aeonik Pro'; 11 | src: url('./fonts/AeonikPro-Medium.woff2') format('woff2'), 12 | url('./fonts/AeonikPro-Medium.woff') format('woff'); 13 | font-weight: 500; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/ui/style/fonts/AeonikPro-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/style/fonts/AeonikPro-Medium.woff -------------------------------------------------------------------------------- /src/ui/style/fonts/AeonikPro-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/style/fonts/AeonikPro-Medium.woff2 -------------------------------------------------------------------------------- /src/ui/style/fonts/AeonikPro-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/style/fonts/AeonikPro-Regular.woff -------------------------------------------------------------------------------- /src/ui/style/fonts/AeonikPro-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeriontech/zerion-wallet-extension/a8ce11d541fb98ca78cfd6543bc36ae627047413/src/ui/style/fonts/AeonikPro-Regular.woff2 -------------------------------------------------------------------------------- /src/ui/style/helpers.module.css: -------------------------------------------------------------------------------- 1 | .hoverNoUnderline { 2 | text-decoration: underline; 3 | } 4 | 5 | @media (hover: hover) { 6 | .hoverUnderline:hover { 7 | text-decoration: underline; 8 | } 9 | 10 | .hoverNoUnderline:hover { 11 | text-decoration: none; 12 | } 13 | } 14 | 15 | /* TODO: maybe applies not only for inputs */ 16 | .visuallyHiddenInput { 17 | border: 0; 18 | clip: rect(0 0 0 0); 19 | height: 1px; 20 | margin: -1px; 21 | overflow: hidden; 22 | padding: 0; 23 | position: absolute; 24 | width: 1px; 25 | } 26 | -------------------------------------------------------------------------------- /src/ui/transactions/usePendingTransactions.ts: -------------------------------------------------------------------------------- 1 | import { useStore } from '@store-unit/react'; 2 | import { getPendingTransactions } from 'src/modules/ethereum/transactions/model'; 3 | import { localTransactionsStore } from './transactions-store'; 4 | 5 | export function usePendingTransactions() { 6 | const localTransactions = useStore(localTransactionsStore); 7 | return getPendingTransactions(localTransactions); 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/ui-kit/AnimatedCheckmark/index.ts: -------------------------------------------------------------------------------- 1 | export { AnimatedCheckmark } from './AnimatedCheckmark'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/BottomPanel/index.ts: -------------------------------------------------------------------------------- 1 | export { StickyBottomPanel } from './BottomPanel'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/BottomPanel/styles.module.css: -------------------------------------------------------------------------------- 1 | .stickyBottomSheet { 2 | position: sticky; 3 | bottom: 0; 4 | padding-bottom: calc(16px + var(--technical-panel-bottom-height, 0px)); 5 | } 6 | 7 | .content { 8 | position: relative; 9 | background-color: var(--background-color, var(--white)); 10 | border-radius: 24px; 11 | box-shadow: var(--elevation-300); 12 | } 13 | 14 | .backdrop { 15 | position: absolute; 16 | backdrop-filter: blur(5px); 17 | top: 24px; 18 | bottom: 0; 19 | left: -16px; 20 | right: -16px; 21 | } 22 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Button/index.ts: -------------------------------------------------------------------------------- 1 | export { Button, type Kind } from './Button'; 2 | export { HoldableButton } from './HoldableButton'; 3 | -------------------------------------------------------------------------------- /src/ui/ui-kit/CircleSpinner/index.ts: -------------------------------------------------------------------------------- 1 | export { CircleSpinner } from './CircleSpinner'; 2 | export type { Props } from './CircleSpinner'; 3 | -------------------------------------------------------------------------------- /src/ui/ui-kit/FormFieldset/index.ts: -------------------------------------------------------------------------------- 1 | export { FormFieldset } from './FormFieldset'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/FormFieldset/styles.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | margin: 0; /* reset default html fieldset margin */ 3 | background-color: var(--neutral-100); 4 | border: 1px solid var(--neutral-100); 5 | border-radius: 16px; 6 | padding: 12px 16px; 7 | } 8 | 9 | .unstyled { 10 | background-color: none; 11 | border: none; 12 | } 13 | 14 | @media (hover: hover) { 15 | .hoverable:hover { 16 | border: 1px solid var(--neutral-400); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Frame/index.ts: -------------------------------------------------------------------------------- 1 | export { Frame } from './Frame'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Frame/styles.module.css: -------------------------------------------------------------------------------- 1 | .frame { 2 | background-color: var(--frame-background-color); 3 | border: 2px solid var(--frame-border-color, var(--neutral-200)); 4 | border-radius: 16px; 5 | padding: 6px; 6 | } 7 | 8 | @media (hover: hover) { 9 | .interactive:enabled:hover { 10 | background-color: var(--neutral-100); 11 | } 12 | } 13 | 14 | .interactive:disabled { 15 | opacity: 0.6; 16 | } 17 | -------------------------------------------------------------------------------- /src/ui/ui-kit/FrameList/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | FrameListItemAnchor, 3 | FrameListItemButton, 4 | FrameListItemLink, 5 | FrameListItem, 6 | } from './FrameListItem'; 7 | -------------------------------------------------------------------------------- /src/ui/ui-kit/HStack/index.ts: -------------------------------------------------------------------------------- 1 | export { HStack } from './HStack'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Input/InnerLabelInput/index.ts: -------------------------------------------------------------------------------- 1 | export { InnerLabelInput } from './InnerLabelInput'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Input/InputDecorator/index.ts: -------------------------------------------------------------------------------- 1 | export { InputDecorator } from './InputDecorator'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Input/SearchInput/index.ts: -------------------------------------------------------------------------------- 1 | export { SearchInput } from './SearchInput'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Input/index.ts: -------------------------------------------------------------------------------- 1 | export { Input } from './Input'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Media/index.ts: -------------------------------------------------------------------------------- 1 | export { Media } from './Media'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/MediaContent/index.ts: -------------------------------------------------------------------------------- 1 | export { MediaContent } from './MediaContent'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/MediaFallback/index.ts: -------------------------------------------------------------------------------- 1 | export { Image, Audio, Video } from './MediaFallback'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/ModalDialogs/BottomSheetDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | BottomSheetDialog, 3 | AnimationPreset as DialogAnimationPreset, 4 | } from './BottomSheetDialog'; 5 | -------------------------------------------------------------------------------- /src/ui/ui-kit/ModalDialogs/CenteredDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { CenteredDialog } from './CenteredDialog'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/ModalDialogs/CenteredDialog/styles.module.css: -------------------------------------------------------------------------------- 1 | @keyframes appear { 2 | from { 3 | transform: scale(0.98); 4 | opacity: 0.8; 5 | } 6 | to { 7 | transform: scale(1); 8 | opacity: 1; 9 | } 10 | } 11 | 12 | .appear { 13 | will-change: transform, opacity; 14 | animation: appear 150ms; 15 | } 16 | 17 | @keyframes fadeIn { 18 | from { 19 | opacity: 0; 20 | } 21 | to { 22 | opacity: 1; 23 | } 24 | } 25 | 26 | .dialog::backdrop { 27 | animation: fadeIn 150ms linear; 28 | background: rgba(0, 0, 0, 0.6); 29 | } 30 | -------------------------------------------------------------------------------- /src/ui/ui-kit/ModalDialogs/DialogTitle/index.ts: -------------------------------------------------------------------------------- 1 | export { DialogTitle, DialogButtonValue } from './DialogTitle'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/ModalDialogs/HTMLDialogElementInterface.ts: -------------------------------------------------------------------------------- 1 | export interface HTMLDialogElementInterface extends HTMLElement { 2 | showModal(): void; 3 | close(): void; 4 | show(): void; 5 | open: boolean; 6 | returnValue: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/ui/ui-kit/NeutralDecimals/index.ts: -------------------------------------------------------------------------------- 1 | export { NeutralDecimals } from './NeutralDecimals'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Radio/index.ts: -------------------------------------------------------------------------------- 1 | export { Radio } from './Radio'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/SegmentedControl/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | SegmentedControlGroup, 3 | SegmentedControlRadio, 4 | SegmentedControlLink, 5 | } from './SegmentedControl'; 6 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Spacer/Spacer.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export function Spacer({ 4 | height, 5 | ...props 6 | }: { height: number } & React.HTMLProps) { 7 | return
; 8 | } 9 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Spacer/index.ts: -------------------------------------------------------------------------------- 1 | export { Spacer } from './Spacer'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/SquareElement/index.ts: -------------------------------------------------------------------------------- 1 | export { SquareElement } from './SquareElement'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Stack/index.ts: -------------------------------------------------------------------------------- 1 | export { Stack } from './Stack'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Surface/index.ts: -------------------------------------------------------------------------------- 1 | export { Surface } from './Surface'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/SurfaceList/VirtualizedSurfaceList/index.ts: -------------------------------------------------------------------------------- 1 | export { VirtualizedSurfaceList } from './VirtualizedSurfaceList'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/SurfaceList/index.ts: -------------------------------------------------------------------------------- 1 | export { SurfaceList } from './SurfaceList'; 2 | export { 3 | ItemLink as SurfaceItemLink, 4 | ItemAnchor as SurfaceItemAnchor, 5 | ItemButton as SurfaceItemButton, 6 | ItemLabel as SurfaceItemLabel, 7 | } from './SurfaceList'; 8 | export type { Item } from './SurfaceList'; 9 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Tag/Tag.module.css: -------------------------------------------------------------------------------- 1 | .tag { 2 | padding: 4px 6px; 3 | border-radius: 6px; 4 | display: flex; 5 | align-items: center; 6 | } 7 | 8 | .primary { 9 | background-color: var(--neutral-200); 10 | color: var(--neutral-600); 11 | } 12 | 13 | .positive { 14 | background-color: var(--positive-200); 15 | color: var(--positive-500); 16 | } 17 | 18 | .negative { 19 | background-color: var(--negative-200); 20 | color: var(--negative-500); 21 | } 22 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Tag/index.ts: -------------------------------------------------------------------------------- 1 | export { Tag } from './Tag'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/TextAnchor/TextAnchor.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | import * as s from './styles.module.css'; 4 | 5 | export function TextAnchor({ 6 | className, 7 | ...props 8 | }: React.AnchorHTMLAttributes) { 9 | return ; 10 | } 11 | -------------------------------------------------------------------------------- /src/ui/ui-kit/TextAnchor/index.ts: -------------------------------------------------------------------------------- 1 | export { TextAnchor } from './TextAnchor'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/TextAnchor/styles.module.css: -------------------------------------------------------------------------------- 1 | :where(.anchor) { 2 | color: inherit; 3 | font-family: inherit; 4 | } 5 | 6 | .anchor { 7 | text-decoration: none; 8 | } 9 | 10 | @media (hover: hover) { 11 | .anchor:hover { 12 | text-decoration: underline; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/ui/ui-kit/TextLink/TextLink.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | import type { LinkProps } from 'react-router-dom'; 4 | import { Link } from 'react-router-dom'; 5 | import * as s from '../TextAnchor/styles.module.css'; 6 | 7 | export function TextLink({ className, ...props }: LinkProps) { 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /src/ui/ui-kit/TextLink/index.ts: -------------------------------------------------------------------------------- 1 | export { TextLink } from './TextLink'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Toggle.ts: -------------------------------------------------------------------------------- 1 | import '@zeriontech/components/lib/style.css'; 2 | export { Toggle } from '@zeriontech/components/lib/Toggle'; 3 | -------------------------------------------------------------------------------- /src/ui/ui-kit/TokenIcon/index.ts: -------------------------------------------------------------------------------- 1 | export { TokenIcon } from './TokenIcon'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Twinkle/Twinkle.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as s from './styles.module.css'; 3 | 4 | export function Twinkle({ children }: React.HTMLAttributes) { 5 | return
{children}
; 6 | } 7 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Twinkle/index.ts: -------------------------------------------------------------------------------- 1 | export { Twinkle } from './Twinkle'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/Twinkle/styles.module.css: -------------------------------------------------------------------------------- 1 | @keyframes twinkleAnimation { 2 | 0% { 3 | opacity: 1; 4 | transform: scale(1); 5 | } 6 | 50% { 7 | opacity: 0.2; 8 | transform: scale(0.9); 9 | } 10 | 100% { 11 | opacity: 1; 12 | transform: scale(1); 13 | } 14 | } 15 | 16 | .twinkle { 17 | animation: twinkleAnimation 1000ms infinite linear; 18 | } 19 | -------------------------------------------------------------------------------- /src/ui/ui-kit/UIText.ts: -------------------------------------------------------------------------------- 1 | import '@zeriontech/components/lib/style.css'; 2 | export { UIText, uiTextParams } from '@zeriontech/components/lib/UIText'; 3 | export type { UITextProps, Kind } from '@zeriontech/components/lib/UIText'; 4 | -------------------------------------------------------------------------------- /src/ui/ui-kit/UnstyledAnchor/UnstyledAnchor.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | import * as s from './styles.module.css'; 4 | 5 | export const UnstyledAnchor = React.forwardRef( 6 | ( 7 | { className, ...props }: React.AnchorHTMLAttributes, 8 | ref: React.Ref 9 | ) => { 10 | return
; 11 | } 12 | ); 13 | -------------------------------------------------------------------------------- /src/ui/ui-kit/UnstyledAnchor/index.ts: -------------------------------------------------------------------------------- 1 | export { UnstyledAnchor } from './UnstyledAnchor'; 2 | -------------------------------------------------------------------------------- /src/ui/ui-kit/UnstyledAnchor/styles.module.css: -------------------------------------------------------------------------------- 1 | :where(.anchor) { 2 | text-decoration: inherit; 3 | color: inherit; 4 | font-family: inherit; 5 | } 6 | -------------------------------------------------------------------------------- /src/ui/ui-kit/UnstyledButton/UnstyledButton.module.css: -------------------------------------------------------------------------------- 1 | :where(.button) { 2 | cursor: pointer; 3 | padding: 0; 4 | margin: 0; 5 | border: none; 6 | background: transparent; 7 | color: currentColor; 8 | font-size: inherit; 9 | font-weight: inherit; 10 | font-family: inherit; 11 | line-height: inherit; 12 | } 13 | -------------------------------------------------------------------------------- /src/ui/ui-kit/UnstyledButton/UnstyledButton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | import * as s from './UnstyledButton.module.css'; 4 | 5 | export const UnstyledButton = React.forwardRef< 6 | HTMLButtonElement, 7 | React.ButtonHTMLAttributes 8 | >(({ className, ...props }, ref) => { 9 | return