diff --git a/.github/workflows/push-koni-dev.yml b/.github/workflows/push-koni-dev.yml index 2781f6789d..0e0e3ef331 100644 --- a/.github/workflows/push-koni-dev.yml +++ b/.github/workflows/push-koni-dev.yml @@ -2,14 +2,10 @@ name: Koni Dev on: pull_request: branches: - - koni-dev - - upgrade-ui - - subwallet-dev + - avail-dev push: branches: - - koni-dev - - upgrade-ui - - subwallet-dev + - avail-dev jobs: master: @@ -41,9 +37,7 @@ jobs: cache: 'yarn' - name: Build Dev env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} GH_PAT: ${{ secrets.GH_PAT }} - GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }} TRANSAK_API_KEY: ${{ secrets.TRANSAK_API_KEY }} COINBASE_PAY_ID: ${{ secrets.COINBASE_PAY_ID }} GH_RELEASE_FILES: master-build.zip,master-src.zip @@ -56,6 +50,7 @@ jobs: run: | yarn install --immutable | grep -v 'YN0013' yarn build:koni-dev + # Deploy after build - name: Upload to Build to Nextcloud id: nextcloud_upload @@ -66,20 +61,7 @@ jobs: nextcloud-url: 'https://file.cdmteck.com' nextcloud-username: ${{ secrets.NEXTCLOUD_USERNAME }} nextcloud-password: ${{ secrets.NEXTCLOUD_PASSWORD }} - - name: Deploy Webrunner to Netlify - id: netlify_deployment - uses: nwtgck/actions-netlify@v2.0 - with: - publish-dir: './packages/web-runner/build' - alias: ${{ steps.setup_params.outputs.ref }} - github-token: ${{ secrets.GH_PAT }} - deploy-message: ${{ github.event.head_commit.message }} - enable-pull-request-comment: true - enable-commit-comment: true - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_WEB_RUNNER_SITE_ID }} - timeout-minutes: 1 + - name: Notify to Discord uses: sarisia/actions-status-discord@v1 if: always() @@ -91,4 +73,3 @@ jobs: description: | The Deployment has been completed. - Extension: ${{ steps.nextcloud_upload.outputs.SHAREABLE_URL }} - - Web-runner: ${{ steps.netlify_deployment.outputs.deploy-url }} diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index 3a04ca5802..44dbf89ca4 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -19,12 +19,9 @@ jobs: token: ${{ secrets.GH_PAT }} - name: ${{ matrix.step }} env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} GH_PAT: ${{ secrets.GH_PAT }} - GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }} GH_RELEASE_FILES: master-build.zip,master-src.zip DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} TRANSAK_API_KEY: ${{ secrets.TRANSAK_API_KEY }} COINBASE_PAY_ID: ${{ secrets.COINBASE_PAY_ID }} BRANCH_NAME: ${{ github.ref_name }} @@ -42,21 +39,6 @@ jobs: nextcloud-username: ${{ secrets.NEXTCLOUD_USERNAME }} nextcloud-password: ${{ secrets.NEXTCLOUD_PASSWORD }} - - name: Deploy Webrunner to Netlify - id: netlify_deployment - uses: nwtgck/actions-netlify@v2.0 - with: - publish-dir: './packages/web-runner/build' - production-branch: master - github-token: ${{ secrets.GH_PAT }} - deploy-message: ${{ github.event.head_commit.message }} - enable-pull-request-comment: true - enable-commit-comment: true - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_WEB_RUNNER_SITE_ID }} - timeout-minutes: 1 - - name: Notify to Discord uses: sarisia/actions-status-discord@v1 if: always() @@ -68,4 +50,3 @@ jobs: description: | Master is completed. - Extension: ${{ steps.nextcloud_upload.outputs.SHAREABLE_URL }} - - Web-runner: ${{ steps.netlify_deployment.outputs.deploy-url }} diff --git a/.github/workflows/push-web-runner.yml b/.github/workflows/push-web-runner.yml deleted file mode 100644 index 6b6130316b..0000000000 --- a/.github/workflows/push-web-runner.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Web Runner -on: - pull_request: - branches: - - web-runner - - web-runner-demo - push: - branches: - - web-runner - - web-runner-demo - -jobs: - master: - strategy: - matrix: - step: ['web-runner:build-zip'] - name: ${{ matrix.step }} - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: ${{ secrets.GH_PAT }} - - name: ${{ matrix.step }} - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - GH_PAT: ${{ secrets.GH_PAT }} - GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }} - GH_RELEASE_FILES: master-build.zip,master-src.zip - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - TRANSAK_API_KEY: ${{ secrets.TRANSAK_API_KEY }} - COINBASE_PAY_ID: ${{ secrets.COINBASE_PAY_ID }} - BRANCH_NAME: master - run: | - yarn install --immutable | grep -v 'YN0013' - yarn ${{ matrix.step }} - - - name: Deploy Webrunner to Netlify - id: netlify_deployment - uses: nwtgck/actions-netlify@v2.0 - with: - publish-dir: './packages/web-runner/build' - production-branch: master - github-token: ${{ secrets.GH_PAT }} - deploy-message: ${{ github.event.head_commit.message }} - enable-pull-request-comment: true - enable-commit-comment: true - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_WEB_RUNNER_SITE_ID }} - timeout-minutes: 1 - - - name: Notify to Discord - uses: sarisia/actions-status-discord@v1 - if: always() - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ job.status }} - username: Extension Worker - title: ${{ github.workflow }} - description: | - Web-runner is completed. - - Web-runner: ${{ steps.netlify_deployment.outputs.deploy-url }} diff --git a/.github/workflows/push-webapp.yml b/.github/workflows/push-webapp.yml index 4bbb599d56..b4a7479bbd 100644 --- a/.github/workflows/push-webapp.yml +++ b/.github/workflows/push-webapp.yml @@ -8,7 +8,6 @@ on: branches: - webapp - webapp-dev - - webapp-demo jobs: master: @@ -45,8 +44,8 @@ jobs: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} projectName: ${{ vars.CLOUDFLARE_PAGES_PROJECT_NAME }} - gitHubToken: ${{ secrets.GH_AUTOMATION_TOKEN }} - branch: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name }} + gitHubToken: ${{ secrets.GH_PAT }} + branch: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name == 'webapp' && 'main' || github.ref_name }} directory: './packages/webapp/build' wranglerVersion: '3' - if: "github.ref_name == 'webapp-dev' && github.event_name == 'push'" diff --git a/README.md b/README.md index d6081c4d63..8b13789179 100644 --- a/README.md +++ b/README.md @@ -1,137 +1 @@ -## SubWallet Extension -Our SubWallet is forked from polkadot-js/extension. We aim to adding more features while being able to rebase the polkadot-js origin at any time. -## Main Concept -![Main Concept](https://github.com/Koniverse/Subwallet-V2/wiki/images/ExtensionConcept.png) -The extension is compiled from folder `packages/extension-koni` -- **Background environment**: The Background environment is compiled from `packages/extension-koni/src/background.ts`. - - The Background is use to handle message from Extensions pages and Chrome tabs via Chrome API Message Passing. - - Save all state to store and persist to chrome storage. - - Run cronjob. -- **Extension**: Is frontend and page of extension: - - popup.html: Frontend page open when click to extension icon in browser. - - portfolio.html: Frontend to display more complicated view. -- **Inject Scripts**: Inject script into chrome tabs. -All data requests must be called and processed in the background. Extension Pages and Inject Scripts use data from the background environment and do not call APIs directly. - -## Project structure -- **extension-base** - Contain main features run in background, call api, persist data into chrome store and inject script. -- **extension-dapp** - A convenience wrapper to work with the injected objects, simplifying data extraction for any dapp that wishes to integrate the extension (or any extension that supports the interface) -- **extension-inject** - A convenience wrapper that allows extension developers to inject their extension for use by any dapp -- **extension-chains** - Definitions for chains that are supported by this extension. It contains the bare definitions as well as a stripped-down (call-only) metadata format. -- **extension-dapp** - The actual in-depth technical breakdown is given in the next section for any dapp developer wishing to work with the raw objects injected into the window. However, convenience wrappers are provided that allows for any dapp to use this extension (or any other extension that conforms to the interface) without having to manage any additional info. -- **extension-mocks** - Mock data for testing. -- **extension-compat-metamask**: Compitable with metamask -- **extension-koni-base**: Custom package, extension extension base -- **extension-koni-ui** *(replace extension-ui)*: The UI components for the extension, to build up the popup -- **extension-koni** *(replace extension)*: All the injection and background processing logic (the main entry) - -# Development Guide - -## Add an API -- API is define in folder `packages/extension-koni-base/src/api` - - Add new file depend on types of API - - Simple API can be defined in function, more complicated API should define in Object. - -## Add a store -Store is used to persist data into local storage. Stores is defined in folder `packages/extension-koni-base/src/store` -- Store class should extend class `BaseStore` or `SubscribableStore` and overwrite class prefix call via constructor. - - `BaseStore` include basic functions persist with chrome local storage - - `SubscribableStore` extend `BaseStore`, include rxjs subject and can be subscribed with method `getSubject()`. This subject trigger every time data is set. - ``` typescript - export default class Price extends SubscribableStore { - constructor () { - super(EXTENSION_PREFIX ? `${EXTENSION_PREFIX}price` : null); - } - } - ``` -- Defined in class `KoniState` and call by `KoniExtension`, `KoniTabs` or `KoniCron`. - ```typescript - export default class KoniState extends State { - private readonly priceStore = new Price(); - private priceStoreReady = false; - - public setPrice (priceData: PriceJson, callback?: (priceData: PriceJson) => void): void { - ... - } - - public getPrice (update: (value: PriceJson) => void): void { - ... - } - - public subscribePrice () { - return this.priceStore.getSubject(); - } - } - ``` - -## Add a message handle -Subwallet extension use message passing concept via browser API to interact between Background - Extensions - Chrome Tabs. -- Extension or Chrome Tabs send a message with id and type to Background -- Background handle message by id and type and response data. -- There are 2 message type: - - One time message: Extension Or Chrome Tabs will send message request and listen response. Listener will be deleted after receive response. - - Subscription message: Same as one time message but listener continue receive data util window close. -- Steps to add new message handle: - - Add request type: - - New request type must define in interface `KoniRequestSignatures` - ```typescript - export interface KoniRequestSignatures { - 'pri(price.getPrice)': [RequestPrice, PriceJson] // Message type from extension - 'pri(price.getSubscription)': [RequestSubscribePrice, boolean, PriceJson] // Message type from extension with subscription - 'pub(utils.getRandom)': [RandomTestRequest, number] // Message type from Tabs - } - ``` - - Every message type must be included: - - Type name like `pri(price.getPrice)`. Message type from extension must start with `pri`, message type from Tabs must start with `pub`. - - Request type like `RequestPrice` - - Response type like `PriceJson` - - Subscription param type (optional) like `PriceJson` - - Add handler (Background): - - Add new case in function handle of `KoniExtension` or `KoniTabs` of package `extension-koni-base` - - Add caller (Extension, Chrome Tabs): - - Add new function in file `messaging.ts` of package `extension-koni-ui` to send request and handle receive data. - -## Add a cron -Cronjob is define in folder `packages/extension-koni-base/src/cron`. -- Group of cron action should define in separate file in this folder. -- Define new cronjob in method init of class `KoniCron` - -## Develop UI - -### UI Structure -- SubWallet Extension UI build with ReactJS. -- Popup: Main extension page, show when click into extension icon in browser extension list. -- Portfolio (Coming soon): Display more complicated view like dashboard, transaction... -- Another folders: - - assets: images, resources of extensions. - - components: Common components use in extension pages. - - hooks: public hook for global function. - - i18n: Internationalization. - - stores: Redux stores generate with react hook. - - partials: Header components - - util: utilities methods. - - messaging.ts: Send to background and handle return message. - -### Add new redux store -- Subwallet extension use [redux-tookit](https://redux-toolkit.js.org/) to generate store. -- Define redux store reducers and state into separate file by method `createSlice` of redux toolkit. -- Map reducer into root store in file index.ts - -### Add new message caller -Read "Add a message handle" - -## Auto validate -Extension auto validate code with eslint. Please setup eslint in editor and run `yarn lint` before commit code. - -## Write test -Subwallet run test with [jest](https://jestjs.io/). Create new file with name `filename.spec.ts` to write test. - -## Commit and Build -- Please run `yarn lint` and `yarn test` -- Versioning: - - Dev version: Dev version is auto generated with by Github Action. - - Stable version: - - Manual change version in main file package.json from x.y.z-nn to x.y.z - - Update CHANGELOG.md - - Github Action will auto generate version file of each package. diff --git a/packages/extension-base/src/koni/api/nft/index.ts b/packages/extension-base/src/koni/api/nft/index.ts index ba460b4a18..c448c22c26 100644 --- a/packages/extension-base/src/koni/api/nft/index.ts +++ b/packages/extension-base/src/koni/api/nft/index.ts @@ -160,6 +160,7 @@ export class NftHandler { } if (_isSupportOrdinal(chain) && targetIsWeb) { + console.log('Support ordinal', chain); const subscanChain = chainInfo.extraInfo?.subscanSlug; if (subscanChain) { diff --git a/packages/extension-base/src/koni/background/handlers/State.ts b/packages/extension-base/src/koni/background/handlers/State.ts index aa9cd45825..8e2b716f32 100644 --- a/packages/extension-base/src/koni/background/handlers/State.ts +++ b/packages/extension-base/src/koni/background/handlers/State.ts @@ -2072,6 +2072,6 @@ export default class KoniState { } public getCrowdloanContributions ({ address, page, relayChain }: RequestCrowdloanContributions) { - return this.subscanService.getCrowdloanContributions(relayChain, address, page); + // return this.subscanService.getCrowdloanContributions(relayChain, address, page); } } diff --git a/packages/extension-base/src/koni/background/subscription.ts b/packages/extension-base/src/koni/background/subscription.ts index e936a5e4d7..ad0c7f40b4 100644 --- a/packages/extension-base/src/koni/background/subscription.ts +++ b/packages/extension-base/src/koni/background/subscription.ts @@ -5,9 +5,8 @@ import { _ChainAsset, _ChainInfo } from '@subwallet/chain-list/types'; import { subscribeCrowdloan } from '@subwallet/extension-base/koni/api/dotsama/crowdloan'; import { nftHandler } from '@subwallet/extension-base/koni/background/handlers'; import { _EvmApi, _SubstrateApi } from '@subwallet/extension-base/services/chain-service/types'; -import { COMMON_RELOAD_EVENTS, EventItem, EventType } from '@subwallet/extension-base/services/event-service/types'; +import { EventItem, EventType } from '@subwallet/extension-base/services/event-service/types'; import DatabaseService from '@subwallet/extension-base/services/storage-service/DatabaseService'; -import { waitTimeout } from '@subwallet/extension-base/utils'; import { logger as createLogger } from '@polkadot/util'; import { Logger } from '@polkadot/util/types'; @@ -56,38 +55,36 @@ export class KoniSubscription { delete this.subscriptionMap.balance; } - if (this.subscriptionMap.crowdloan) { - this.subscriptionMap.crowdloan(); - delete this.subscriptionMap.crowdloan; - } + // if (this.subscriptionMap.crowdloan) { + // this.subscriptionMap.crowdloan(); + // delete this.subscriptionMap.crowdloan; + // } } async start () { await Promise.all([this.state.eventService.waitCryptoReady, this.state.eventService.waitKeyringReady, this.state.eventService.waitAssetReady]); - const currentAddress = this.state.keyringService.currentAccount?.address; - - if (currentAddress) { - this.subscribeCrowdloans(currentAddress, this.state.getSubstrateApiMap()); - } - - this.eventHandler = (events, eventTypes) => { - const serviceInfo = this.state.getServiceInfo(); - const needReload = eventTypes.some((eventType) => COMMON_RELOAD_EVENTS.includes(eventType)); - - if (!needReload) { - return; - } - - const address = serviceInfo.currentAccountInfo?.address; - - if (!address) { - return; - } - - this.subscribeCrowdloans(address, serviceInfo.chainApiMap.substrate); - }; - - this.state.eventService.onLazy(this.eventHandler.bind(this)); + // const currentAddress = this.state.keyringService.currentAccount?.address; + + // if (currentAddress) { + // // this.subscribeCrowdloans(currentAddress, this.state.getSubstrateApiMap()); + // } + // + // this.eventHandler = (events, eventTypes) => { + // const serviceInfo = this.state.getServiceInfo(); + // const needReload = eventTypes.some((eventType) => COMMON_RELOAD_EVENTS.includes(eventType)); + // + // if (!needReload) { + // return; + // } + // + // const address = serviceInfo.currentAccountInfo?.address; + // + // if (!address) { + // return; + // } + // }; + // + // this.state.eventService.onLazy(this.eventHandler.bind(this)); } async stop () { @@ -153,10 +150,10 @@ export class KoniSubscription { } async reloadCrowdloan () { - const currentAddress = this.state.keyringService.currentAccount?.address; - - this.subscribeCrowdloans(currentAddress, this.state.getSubstrateApiMap()); - - await waitTimeout(1800); + // const currentAddress = this.state.keyringService.currentAccount?.address; + // + // this.subscribeCrowdloans(currentAddress, this.state.getSubstrateApiMap()); + // + // await waitTimeout(1800); } } diff --git a/packages/extension-base/src/page/SubWalleEvmProvider.ts b/packages/extension-base/src/page/SubWalleEvmProvider.ts index 12cf16bb93..97c58d2230 100644 --- a/packages/extension-base/src/page/SubWalleEvmProvider.ts +++ b/packages/extension-base/src/page/SubWalleEvmProvider.ts @@ -132,7 +132,7 @@ export class SubWalletEvmProvider extends SafeEventEmitter implements EvmProvide switch (payload.method) { case 'net_version': - result = this.version ? `SubWallet v${this.version}` : null; + result = this.version ? `Avail Space v${this.version}` : null; break; default: throw new Error(`Not support ${payload.method}`); diff --git a/packages/extension-base/src/services/chain-service/constants.ts b/packages/extension-base/src/services/chain-service/constants.ts index 25764fd2c0..08860c3c31 100644 --- a/packages/extension-base/src/services/chain-service/constants.ts +++ b/packages/extension-base/src/services/chain-service/constants.ts @@ -1,7 +1,6 @@ // Copyright 2019-2022 @subwallet/extension-base // SPDX-License-Identifier: Apache-2.0 -import { _DEFAULT_CHAINS } from '@subwallet/chain-list'; import { _SubstrateChainType } from '@subwallet/chain-list/types'; import { SingleModeJson, ThemeNames } from '@subwallet/extension-base/background/KoniTypes'; @@ -253,10 +252,7 @@ export const _XCM_TYPE = { PR: `${_SubstrateChainType.PARACHAIN}-${_SubstrateChainType.RELAYCHAIN}` // UMP }; -export const _DEFAULT_ACTIVE_CHAINS = [ - ..._DEFAULT_CHAINS, - 'vara_network' -]; +export const _DEFAULT_ACTIVE_CHAINS = ['goldberg_testnet']; export const EVM_PASS_CONNECT_STATUS: Record = { arbitrum_one: ['*'], diff --git a/packages/extension-base/src/services/chain-service/index.ts b/packages/extension-base/src/services/chain-service/index.ts index c3e46618c2..fe23b8c68f 100644 --- a/packages/extension-base/src/services/chain-service/index.ts +++ b/packages/extension-base/src/services/chain-service/index.ts @@ -22,6 +22,32 @@ import Web3 from 'web3'; import { logger as createLogger } from '@polkadot/util/logger'; import { Logger } from '@polkadot/util/types'; +const availChainInfoMap = (() => { + const enableList = [ + 'avail_mainnet', + 'availTuringTest', + 'goldberg_testnet', + 'ethereum', + 'binance', + 'polygon', + 'arbitrum_one', + 'optimism', + 'avalanche_c', + 'base_mainnet', + 'fantom', + 'tomochain', + 'manta_network_evm', + 'ethereum_goerli', + 'binance_test', + 'fantom_testnet', + 'okxTest' + ]; + + return Object.fromEntries(enableList.map((slug) => { + return [slug, ChainInfoMap[slug]]; + })); +})(); + export class ChainService { private dataMap: _DataMap = { chainInfoMap: {}, @@ -511,6 +537,8 @@ export class ChainService { } public upsertCustomToken (token: _ChainAsset) { + const chainInfo = this.getChainInfoByKey(token.originChain); + if (token.slug.length === 0) { // new token if (token.assetType === _AssetType.NATIVE) { const defaultSlug = this.generateSlugForNativeToken(token.originChain, token.assetType, token.symbol); @@ -524,7 +552,7 @@ export class ChainService { } if (token.originChain && _isAssetFungibleToken(token)) { - token.hasValue = !(this.getChainInfoByKey(token.originChain)?.isTestnet); + token.hasValue = !chainInfo?.isTestnet; } const assetRegistry = this.getAssetRegistry(); @@ -1023,7 +1051,7 @@ export class ChainService { private async initChains () { const storedChainSettings = await this.dbService.getAllChainStore(); - const defaultChainInfoMap = ChainInfoMap; + const defaultChainInfoMap = availChainInfoMap; const storedChainSettingMap: Record = {}; storedChainSettings.forEach((chainStoredSetting) => { diff --git a/packages/extension-base/src/services/chain-service/utils/index.ts b/packages/extension-base/src/services/chain-service/utils/index.ts index f19f90a343..54717713ae 100644 --- a/packages/extension-base/src/services/chain-service/utils/index.ts +++ b/packages/extension-base/src/services/chain-service/utils/index.ts @@ -134,8 +134,8 @@ export function _getTokenMinAmount (tokenInfo: _ChainAsset) { return tokenInfo.minAmount || '0'; } -export function _isChainEvmCompatible (chainInfo: _ChainInfo) { - return !!chainInfo.evmInfo; +export function _isChainEvmCompatible (chainInfo?: _ChainInfo) { + return !!chainInfo?.evmInfo; } export function _isNativeToken (tokenInfo: _ChainAsset) { @@ -195,7 +195,7 @@ export function _isChainSupportWasmNft (chainInfo: _ChainInfo) { } export const _isSupportOrdinal = (chain: string) => { - const chains = ['polkadot', 'astar', 'bifrost_dot', 'moonbeam']; + const chains = ['goldberg_testnet']; return chains.includes(chain); }; diff --git a/packages/extension-base/src/services/earning-service/service.ts b/packages/extension-base/src/services/earning-service/service.ts index 5f83912aa9..2bc3c258a8 100644 --- a/packages/extension-base/src/services/earning-service/service.ts +++ b/packages/extension-base/src/services/earning-service/service.ts @@ -207,7 +207,7 @@ export default class EarningService implements StoppableServiceInterface, Persis // Account changed or chain changed (active or inactive) // Chain changed (active or inactive) // Todo: Optimize performance of chain active or inactive in the future - if (eventTypes.includes('account.updateCurrent') || eventTypes.includes('account.remove') || eventTypes.includes('chain.updateState') || delayReload) { + if (eventTypes.includes('account.updateCurrent') || eventTypes.includes('account.add') || eventTypes.includes('account.remove') || eventTypes.includes('chain.updateState') || delayReload) { if (delayReload) { this.delayReloadTimeout = setTimeout(() => { this.reloadEarning().catch(console.error); // Timeout is removed inside reloadEarning > runUnsubscribePoolsPosition diff --git a/packages/extension-base/src/services/migration-service/scripts/EnableAvailTuringChain.ts b/packages/extension-base/src/services/migration-service/scripts/EnableAvailTuringChain.ts new file mode 100644 index 0000000000..ca5215b828 --- /dev/null +++ b/packages/extension-base/src/services/migration-service/scripts/EnableAvailTuringChain.ts @@ -0,0 +1,8 @@ +// Copyright 2019-2022 @subwallet/extension-koni authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import EnableChain from './EnableChain'; + +export default class EnableAvailTuringChain extends EnableChain { + slug = 'availTuringTest'; +} diff --git a/packages/extension-base/src/services/migration-service/scripts/index.ts b/packages/extension-base/src/services/migration-service/scripts/index.ts index a460cfd153..c01c81ac99 100644 --- a/packages/extension-base/src/services/migration-service/scripts/index.ts +++ b/packages/extension-base/src/services/migration-service/scripts/index.ts @@ -1,59 +1,39 @@ // Copyright 2019-2022 @subwallet/extension-koni authors & contributors // SPDX-License-Identifier: Apache-2.0 -import AutoEnableSomeTokens from '@subwallet/extension-base/services/migration-service/scripts/databases/AutoEnableSomeTokens'; -import DeleteEarningData from '@subwallet/extension-base/services/migration-service/scripts/DeleteEarningData'; +import EnableAvailTuringChain from '@subwallet/extension-base/services/migration-service/scripts/EnableAvailTuringChain'; import MigrateTransactionHistoryBySymbol from '@subwallet/extension-base/services/migration-service/scripts/MigrateTransactionHistoryBySymbol'; import BaseMigrationJob from '../Base'; import MigrateAssetSetting from './databases/MigrateAssetSetting'; -import MigrateEarningVersion from './databases/MigrateEarningVersion'; -import MigrateEthProvider from './providers/MigrateEthProvider'; -import MigratePioneerProvider from './providers/MigratePioneerProvider'; -import MigrateProvidersV1M1P24 from './providers/MigrateProvidersV1M1P24'; -import MigratePolygonUSDCProvider from './tokens/MigratePolygonUSDCProvider'; -import AutoEnableChainsTokens from './AutoEnableChainsTokens'; -import DeleteChain from './DeleteChain'; -import DeleteChainStaking from './DeleteChainStaking'; -import EnableVaraChain from './EnableVaraChain'; -import MigrateAuthUrls from './MigrateAuthUrls'; -import MigrateAutoLock from './MigrateAutoLock'; -import MigrateChainPatrol from './MigrateChainPatrol'; -import MigrateImportedToken from './MigrateImportedToken'; -import MigrateLedgerAccount from './MigrateLedgerAccount'; -import MigrateNetworkSettings from './MigrateNetworkSettings'; -import MigrateSettings from './MigrateSettings'; -import MigrateTokenDecimals from './MigrateTokenDecimals'; -import MigrateTransactionHistory from './MigrateTransactionHistory'; -import MigrateWalletReference from './MigrateWalletReference'; export const EVERYTIME = '__everytime__'; export default >{ - '1.0.1-11': MigrateNetworkSettings, - '1.0.1-20': MigrateImportedToken, - '1.0.1-30': MigrateTransactionHistory, - '1.0.1-40': AutoEnableChainsTokens, - '1.0.1-50': MigrateSettings, - '1.0.1-60': MigrateAuthUrls, - '1.0.3-01': MigrateAutoLock, - '1.0.3-02': MigrateChainPatrol, - '1.0.9-01': MigrateLedgerAccount, - '1.0.12-02': MigrateEthProvider, - '1.1.6-01': MigrateWalletReference, - '1.1.7': DeleteChain, - '1.1.13-01': MigrateTokenDecimals, + // '1.0.1-11': MigrateNetworkSettings, + // '1.0.1-20': MigrateImportedToken, + // '1.0.1-30': MigrateTransactionHistory, + // '1.0.1-40': AutoEnableChainsTokens, + // '1.0.1-50': MigrateSettings, + // '1.0.1-60': MigrateAuthUrls, + // '1.0.3-01': MigrateAutoLock, + // '1.0.3-02': MigrateChainPatrol, + // '1.0.9-01': MigrateLedgerAccount, + // '1.0.12-02': MigrateEthProvider, + // '1.1.6-01': MigrateWalletReference, + // '1.1.7': DeleteChain, + // '1.1.13-01': MigrateTokenDecimals, // '1.1.13-02-2': EnableEarningChains, - '1.1.13-03': DeleteEarningData, - '1.1.17-01': MigratePioneerProvider, - '1.1.17-03': EnableVaraChain, - '1.1.24-01': MigrateProvidersV1M1P24, - '1.1.26-01': MigratePolygonUSDCProvider, - '1.1.28-01': MigrateEarningVersion, - '1.1.41-01': DeleteChainStaking, - '1.1.46-01': AutoEnableSomeTokens, + // '1.1.13-03': DeleteEarningData, + // '1.1.17-01': MigratePioneerProvider, + // '1.1.17-03': EnableVaraChain, + // '1.1.24-01': MigrateProvidersV1M1P24, + // '1.1.26-01': MigratePolygonUSDCProvider, + // '1.1.28-01': MigrateEarningVersion, + // '1.1.41-01': DeleteChainStaking + // '1.1.41-02': MigrateAssetSetting + // [`${EVERYTIME}-1`]: AutoEnableChainsTokens + '1.1.58-0___AVAIL': EnableAvailTuringChain, '1.1.62-01': MigrateAssetSetting, '1.1.62-02': MigrateTransactionHistoryBySymbol - // [`${EVERYTIME}-1.1.42-02`]: MigrateTransactionHistoryBySymbol - // [`${EVERYTIME}-1`]: AutoEnableChainsTokens }; diff --git a/packages/extension-base/src/services/subscan-service/index.ts b/packages/extension-base/src/services/subscan-service/index.ts index 48190331c1..2b2e3d952c 100644 --- a/packages/extension-base/src/services/subscan-service/index.ts +++ b/packages/extension-base/src/services/subscan-service/index.ts @@ -18,7 +18,7 @@ interface SubscanError { export class SubscanService { private callRate = 2; // limit per interval check private limitRate = 2; // max rate per interval check - private intervalCheck = 1000; // interval check in ms + private intervalCheck = 1200; // interval check in ms private maxRetry = 9; // interval check in ms private rollbackRateTime = 30 * 1000; // rollback rate time in ms private timeoutRollbackRate: NodeJS.Timeout | undefined = undefined; @@ -50,7 +50,7 @@ export class SubscanService { const subscanChain = this.subscanChainMap[chain]; if (!subscanChain) { - throw new SWError('NOT_SUPPORTED', 'Chain is not supported'); + throw new SWError('NOT_SUPPORTED', `Chain ${chain} is not supported for path ${path}`); } return `https://${subscanChain}.api.subscan.io/${path}`; @@ -113,6 +113,7 @@ export class SubscanService { request.run().then((rs) => { request.resolve(rs); }).catch((e: Error) => { + console.error(e); const error = JSON.parse(e.message) as SubscanError; // Limit rate @@ -138,7 +139,11 @@ export class SubscanService { } public setSubscanChainMap (subscanChainMap: Record) { - this.subscanChainMap = subscanChainMap; + this.subscanChainMap = { + ...subscanChainMap, + 'avail-testnet': 'avail-testnet', + polkadot: 'polkadot' + }; } // Implement Subscan API diff --git a/packages/extension-base/src/services/subscan-service/subscan-chain-map.ts b/packages/extension-base/src/services/subscan-service/subscan-chain-map.ts index 4711336dab..b9e9eb9173 100644 --- a/packages/extension-base/src/services/subscan-service/subscan-chain-map.ts +++ b/packages/extension-base/src/services/subscan-service/subscan-chain-map.ts @@ -64,7 +64,8 @@ export const SUBSCAN_API_CHAIN_MAP: Record = { vara_network: 'vara', krest_network: 'krest', crust_mainnet: 'crust', - manta_network: 'manta' + manta_network: 'manta', + goldberg_testnet: 'avail-testnet' }; /** diff --git a/packages/extension-base/src/utils/fetchStaticData.ts b/packages/extension-base/src/utils/fetchStaticData.ts index b0b6e4febb..b4a6aa7a0b 100644 --- a/packages/extension-base/src/utils/fetchStaticData.ts +++ b/packages/extension-base/src/utils/fetchStaticData.ts @@ -14,6 +14,8 @@ export async function fetchStaticData (slug: string, targetFile?: string) { try { const rs = await axios.get(`https://static-data.subwallet.app/${slug}/${fetchFile}`); + console.log('fetchStaticData', slug, fetchFile); + return rs.data as T; } catch (e) { return staticData[slug as StaticKey] as T; diff --git a/packages/extension-base/src/utils/staticData/index.ts b/packages/extension-base/src/utils/staticData/index.ts index fdffbeb37e..d0f8b2facb 100644 --- a/packages/extension-base/src/utils/staticData/index.ts +++ b/packages/extension-base/src/utils/staticData/index.ts @@ -23,7 +23,7 @@ export enum StaticKey { CURRENCY_SYMBOL = 'currency_symbols', MARKETING_CAMPAINGS = 'marketing-campaigns', CROWDLOAN_FUNDS = 'crowdloan-funds', - TERM_AND_CONDITION = 'term-and-condition', + TERM_AND_CONDITION = 'markdown-contents/term_and_condition_avail', BUY_TOKEN_CONFIGS = 'buy-token-configs' } diff --git a/packages/extension-base/src/utils/staticData/termAndCondition.json b/packages/extension-base/src/utils/staticData/termAndCondition.json index 1d767a9c1e..7223a16dde 100644 --- a/packages/extension-base/src/utils/staticData/termAndCondition.json +++ b/packages/extension-base/src/utils/staticData/termAndCondition.json @@ -1,3 +1,3 @@ { - "default": "These Terms of Use (“Agreement”) set forth the general terms and conditions of your use of the SubWallet extension application, mobile application, and web dashboard application (\"SubWallet Application\") and any of its related products and services (collectively, “Services”). \n\nThis Agreement is legally binding between you (“User”, “you” or “your”) and this application developer (“Operator”, “we”, “us” or “our”). If you are entering into this Agreement on behalf of a business or other legal entity, you represent that you have the authority to bind such an entity to this Agreement, in which case the terms “User”, “you” or “your” shall refer to such entity. \n\nIf you do not have such authority, or if you do not agree with the terms of this Agreement, you must not accept this Agreement and may not access and use the SubWallet Application and Services. By accessing and using the SubWallet Application and Services, you acknowledge that you have read, understood, and agree to be bound by the terms of this Agreement. You acknowledge that this Agreement is a contract between you and the Operator, even though it is electronic and is not physically signed by you, and it governs your use of the SubWallet Application and Services.\n\nThis Agreement is written in various languages. If there is any dispute, the English language shall prevail.\n\n#### **Accounts and membership**\n\nIf you create a wallet in the SubWallet Application, you are responsible for maintaining the security of your wallet and you are fully responsible for all activities that occur with the wallet and any other actions taken in connection with it. You should understand that we do not have access to any wallet-related information on our side, nor are we able to send it to any other party. \n\nAll such information is stored locally on your device(s) which we do not have access to and you bear full responsibility for its (their) safety. Your wallet private keys/seed phrases are not backed up along with other data so if you delete SubWallet Application, it will be impossible to restore your keys from a backup.\n\n#### **Privacy Policy**\n\nWe respect your privacy and are committed to protecting it through our compliance with this privacy policy (“Policy”). This Policy describes the types of information we may collect from you or that you may provide on the SubWallet Application, SubWallet.App website, and any of their related products and services, and our practices for collecting, using, maintaining, protecting, and disclosing that information. By accessing and using the Services, you acknowledge that you have read, understood, and agree to be bound by the terms of this Policy. This Policy does not apply to the practices of companies that we do not own or control, or to individuals that we do not employ or manage. \n\n##### **Information category**\n\nFor the purposes of the given document, we would like to classify information into the following categories: Data that is used for wallet creation, import, and export (i.e., seed phrase, private key, etc.) (“Sensitive information”), personally identifiable information (i.e., data that could potentially identify you as an individual) (“Personal information”), and Non-personally identifiable information (i.e., information that cannot be used to identify who you are) (“Non-personal information”). This Policy covers all the categories and will tell you how we might collect and use each type.\n\n*Sensitive information*\n\nYour Sensitive information is not collected or stored by us. In particular, it is not sent anywhere, is not stored anywhere except your device, and is not included in backups of the operating system. We are committed to making sure your information is protected and we employ several mechanisms to keep your information safe, including on-device encryption, verification and authentication by password or biometrics, and securing all network connections with industry-standard transport layer security. However, even with these precautions taken by us, the safety of your device and your seed phrase or backup data is solely your responsibility.\n\n*Personal information & Non-personal information*\n\nYou can access and use the Services without telling us who you are or revealing any information by which someone could identify you as a specific, identifiable individual. In other words, no Personal information is collected by our Services. This applies to all categories of users, including children under the age of 18. Please note that our extension and app have been uploaded to the Store on desktop browsers (Chrome, Brave, Edge & Firefox) and mobile (App Store and Play Store). These stores may track some of your information and activities including but not limited to log data, cookies, etc.\n\n##### **Disclosure of information**\n\nWe do not share your information with anyone or for any reason.\n\n##### **Security Measures**\n\nIn the event we become aware that the security of the Services has been compromised as a result of external activity, including, but not limited to, security attacks or fraud, we reserve the right to take reasonably appropriate measures, including, but not limited to, investigation and reporting, as well as notification to and cooperation with law enforcement authorities. In such cases, we will make reasonable efforts to notify affected individuals if we believe that there is a reasonable risk of harm to them or if notice is otherwise required by law. When we do, we will post a notice on the Services.\n\n##### **Do Not Track signals**\n\nSome browsers incorporate a Do Not Track feature that signals to websites you visit that you do not want to have your online activity tracked. Tracking is not the same as using or collecting information in connection with a website. For these purposes, tracking refers to collecting personally identifiable information from consumers who use or visit a website or online service as they move across different websites over time. The Services do not track its visitors over time and across third-party websites. However, some third-party websites may keep track of your browsing activities when they serve you content, which enables them to tailor what they present to you.\n\n#### **Links to other resources**\n\nAlthough the SubWallet Application and Services may link to other resources (such as websites, other applications, etc.), we are not, directly or indirectly, implying any approval, association, sponsorship, endorsement, or affiliation with any linked resource, unless specifically stated herein. We are not responsible for examining or evaluating, and we do not warrant the offerings of any businesses or individuals or the content of their resources. \n\nWe do not assume any responsibility or liability for the actions, products, services, and content of any other third parties. You should carefully review the legal statements and other conditions of use of any resource that you access through a link in the SubWallet Application. Your linking to any other off-site resources is at your own risk.\n\n#### **Prohibited uses**\n\nIn addition to other terms as set forth in the Agreement, you are prohibited from using the SubWallet Application and Services:\n\n1. For any unlawful purpose\n2. To solicit others to perform or participate in any unlawful acts\n3. To violate any international, federal, provincial, or state regulations, rules, laws, or local ordinances\n4. To infringe upon or violate our intellectual property rights or the intellectual property rights of others\n5. To harass, abuse, insult, harm, defame, slander, disparage, intimidate, or discriminate based on gender, sexual orientation, religion, ethnicity, race, age, national origin, or disability\n6. To submit false or misleading information\n7. To upload or transmit viruses or any other type of malicious code that will or may be used in any way that will affect the functionality or operation of the SubWallet Application and Services, third-party products and services, or the Internet\n8. To spam, phish, pharm, pretext, spider, crawl, or scrape\n9. For any obscene or immoral purpose\n10. To interfere with or circumvent the security features of the SubWallet Application and Services, third-party products and services, or the Internet.\n \n#### **Intellectual property rights**\n\n“Intellectual Property Rights” means all present and future rights conferred by statute, common law, or equity in or in relation to any copyright and related rights, trademarks, designs, patents, inventions, goodwill, and the right to sue for passing off, rights to inventions, rights to use, and all other intellectual property rights, in each case whether registered or unregistered and including all applications and rights to apply for and be granted, rights to claim priority from, such rights and all similar or equivalent rights or forms of protection and any other results of intellectual activity which subsist or will subsist now or in the future in any part of the world.\n\nThis Agreement does not transfer to you any intellectual property owned by the Operator or third parties, and all rights, titles, and interests in and to such property will remain (as between the parties) solely with the Operator. All trademarks, service marks, graphics, and logos used in connection with the SubWallet Application and Services, are trademarks or registered trademarks of the Operator or its licensors.\n\nOther trademarks, service marks, graphics, and logos used in connection with the SubWallet Application and Services may be the trademarks of other third parties. Your use of the SubWallet Application and Services grants you no right or license to reproduce or otherwise use any of the Operator or third-party trademarks.\n\n#### **Limitation of liability**\n\nTo the fullest extent permitted by applicable law, in no event will the Operator, its affiliates, directors, officers, employees, agents, suppliers, or licensors be liable to any person for any indirect, incidental, special, punitive, cover or consequential damages (including, without limitation, damages for lost profits, revenue, sales, goodwill, use of content, impact on business, business interruption, loss of anticipated savings, loss of business opportunity) however caused, under any theory of liability, including, without limitation, contract, tort, warranty, breach of statutory duty, negligence or otherwise, even if the liable party has been advised as to the possibility of such damages or could have foreseen such damages. \n\n#### **Indemnification**\n\nYou agree to indemnify and hold the Operator and its affiliates, directors, officers, employees, agents, suppliers, and licensors harmless from and against any liabilities, losses, damages, or costs, including reasonable attorneys’ fees, incurred in connection with or arising from any third-party allegations, claims, actions, disputes, or demands asserted against any of them as a result of or relating to your use of the SubWallet Application and Services or any willful misconduct on your part.\n\n#### **Severability**\n\nAll rights and restrictions contained in this Agreement may be exercised and shall be applicable and binding only to the extent that they do not violate any applicable laws and are intended to be limited to the extent necessary so that they will not render this Agreement illegal, invalid, or unenforceable. If any provision or portion of any provision of this Agreement shall be held to be illegal, invalid, or unenforceable by a court of competent jurisdiction, it is the intention of the parties that the remaining provisions or portions thereof shall constitute their Agreement with respect to the subject matter hereof, and all such remaining provisions or portions thereof shall remain in full force and effect.\n\n#### **Dispute resolution**\n\nThe formation, interpretation, and performance of this Agreement and any disputes arising out of it shall be governed by the substantive and procedural laws of the United Nations Convention without regard to its rules on conflicts or choice of law and, to the extent applicable, the laws of the United Nations Convention. The exclusive jurisdiction and venue for actions related to the subject matter hereof shall be the courts located in the United Nations Convention, and you hereby submit to the personal jurisdiction of such courts. You hereby waive any right to a jury trial in any proceeding arising out of or related to this Agreement. The United Nations Convention on Contracts for the International Sale of Goods does not apply to this Agreement.\n\n#### **Changes and amendments**\n\nWe reserve the right to modify this Agreement or its terms related to the SubWallet Application and Services at any time at our discretion. When we do, we will revise the updated date at the bottom of this page. We may also provide notice to you in other ways at our discretion, such as through the contact information you have provided.\n\nAn updated version of this Agreement will be effective immediately upon the posting of the revised Agreement unless otherwise specified. Your continued use of the SubWallet Application and Services after the effective date of the revised Agreement (or such other act specified at that time) will constitute your consent to those changes.\n\n#### **Acceptance of these terms**\n\nYou acknowledge that you have read this Agreement and agree to all its terms and conditions. By accessing and using the SubWallet Application and Services you agree to be bound by this Agreement. If you do not agree to abide by the terms of this Agreement, you are not authorized to access or use the SubWallet Application and Services.\n\n#### **Contacting us**\n\nIf you have any questions, concerns, or complaints regarding this Agreement, we encourage you to contact us using the details below:\n\n**Email:** [**agent@subwallet.app**](mailto:agent@subwallet.app)\n\nLast modified Jan 10, 2024." + "default": "These Terms of Use (“Agreement”) set forth the general terms and conditions of your use of the Avail Space extension application, mobile application, and web dashboard application (\"Avail Space Application\") and any of its related products and services (collectively, “Services”). \n\nThis Agreement is legally binding between you (“User”, “you” or “your”) and this application developer (“Operator”, “we”, “us” or “our”). If you are entering into this Agreement on behalf of a business or other legal entity, you represent that you have the authority to bind such an entity to this Agreement, in which case the terms “User”, “you” or “your” shall refer to such entity. \n\nIf you do not have such authority, or if you do not agree with the terms of this Agreement, you must not accept this Agreement and may not access and use the Avail Space Application and Services. By accessing and using the Avail Space Application and Services, you acknowledge that you have read, understood, and agree to be bound by the terms of this Agreement. You acknowledge that this Agreement is a contract between you and the Operator, even though it is electronic and is not physically signed by you, and it governs your use of the Avail Space Application and Services.\n\nThis Agreement is written in various languages. If there is any dispute, the English language shall prevail.\n\n#### **Accounts and membership**\n\nIf you create a wallet in the Avail Space Application, you are responsible for maintaining the security of your wallet and you are fully responsible for all activities that occur with the wallet and any other actions taken in connection with it. You should understand that we do not have access to any wallet-related information on our side, nor are we able to send it to any other party. \n\nAll such information is stored locally on your device(s) which we do not have access to and you bear full responsibility for its (their) safety. Your wallet private keys/seed phrases are not backed up along with other data so if you delete Avail Space Application, it will be impossible to restore your keys from a backup.\n\n#### **Privacy Policy**\n\nWe respect your privacy and are committed to protecting it through our compliance with this privacy policy (“Policy”). This Policy describes the types of information we may collect from you or that you may provide on the Avail Space Application, availspace.app website, and any of their related products and services, and our practices for collecting, using, maintaining, protecting, and disclosing that information. By accessing and using the Services, you acknowledge that you have read, understood, and agree to be bound by the terms of this Policy. This Policy does not apply to the practices of companies that we do not own or control, or to individuals that we do not employ or manage. \n\n##### **Information category**\n\nFor the purposes of the given document, we would like to classify information into the following categories: Data that is used for wallet creation, import, and export (i.e., seed phrase, private key, etc.) (“Sensitive information”), personally identifiable information (i.e., data that could potentially identify you as an individual) (“Personal information”), and Non-personally identifiable information (i.e., information that cannot be used to identify who you are) (“Non-personal information”). This Policy covers all the categories and will tell you how we might collect and use each type.\n\n*Sensitive information*\n\nYour Sensitive information is not collected or stored by us. In particular, it is not sent anywhere, is not stored anywhere except your device, and is not included in backups of the operating system. We are committed to making sure your information is protected and we employ several mechanisms to keep your information safe, including on-device encryption, verification and authentication by password or biometrics, and securing all network connections with industry-standard transport layer security. However, even with these precautions taken by us, the safety of your device and your seed phrase or backup data is solely your responsibility.\n\n*Personal information & Non-personal information*\n\nYou can access and use the Services without telling us who you are or revealing any information by which someone could identify you as a specific, identifiable individual. In other words, no Personal information is collected by our Services. This applies to all categories of users, including children under the age of 18. Please note that our extension and app have been uploaded to the Store on desktop browsers (Chrome, Brave, Edge & Firefox) and mobile (App Store and Play Store). These stores may track some of your information and activities including but not limited to log data, cookies, etc.\n\n##### **Disclosure of information**\n\nWe do not share your information with anyone or for any reason.\n\n##### **Security Measures**\n\nIn the event we become aware that the security of the Services has been compromised as a result of external activity, including, but not limited to, security attacks or fraud, we reserve the right to take reasonably appropriate measures, including, but not limited to, investigation and reporting, as well as notification to and cooperation with law enforcement authorities. In such cases, we will make reasonable efforts to notify affected individuals if we believe that there is a reasonable risk of harm to them or if notice is otherwise required by law. When we do, we will post a notice on the Services.\n\n##### **Do Not Track signals**\n\nSome browsers incorporate a Do Not Track feature that signals to websites you visit that you do not want to have your online activity tracked. Tracking is not the same as using or collecting information in connection with a website. For these purposes, tracking refers to collecting personally identifiable information from consumers who use or visit a website or online service as they move across different websites over time. The Services do not track its visitors over time and across third-party websites. However, some third-party websites may keep track of your browsing activities when they serve you content, which enables them to tailor what they present to you.\n\n#### **Links to other resources**\n\nAlthough the Avail Space Application and Services may link to other resources (such as websites, other applications, etc.), we are not, directly or indirectly, implying any approval, association, sponsorship, endorsement, or affiliation with any linked resource, unless specifically stated herein. We are not responsible for examining or evaluating, and we do not warrant the offerings of any businesses or individuals or the content of their resources. \n\nWe do not assume any responsibility or liability for the actions, products, services, and content of any other third parties. You should carefully review the legal statements and other conditions of use of any resource that you access through a link in the Avail Space Application. Your linking to any other off-site resources is at your own risk.\n\n#### **Prohibited uses**\n\nIn addition to other terms as set forth in the Agreement, you are prohibited from using the Avail Space Application and Services:\n\n1. For any unlawful purpose\n2. To solicit others to perform or participate in any unlawful acts\n3. To violate any international, federal, provincial, or state regulations, rules, laws, or local ordinances\n4. To infringe upon or violate our intellectual property rights or the intellectual property rights of others\n5. To harass, abuse, insult, harm, defame, slander, disparage, intimidate, or discriminate based on gender, sexual orientation, religion, ethnicity, race, age, national origin, or disability\n6. To submit false or misleading information\n7. To upload or transmit viruses or any other type of malicious code that will or may be used in any way that will affect the functionality or operation of the Avail Space Application and Services, third-party products and services, or the Internet\n8. To spam, phish, pharm, pretext, spider, crawl, or scrape\n9. For any obscene or immoral purpose\n10. To interfere with or circumvent the security features of the Avail Space Application and Services, third-party products and services, or the Internet.\n \n#### **Intellectual property rights**\n\n“Intellectual Property Rights” means all present and future rights conferred by statute, common law, or equity in or in relation to any copyright and related rights, trademarks, designs, patents, inventions, goodwill, and the right to sue for passing off, rights to inventions, rights to use, and all other intellectual property rights, in each case whether registered or unregistered and including all applications and rights to apply for and be granted, rights to claim priority from, such rights and all similar or equivalent rights or forms of protection and any other results of intellectual activity which subsist or will subsist now or in the future in any part of the world.\n\nThis Agreement does not transfer to you any intellectual property owned by the Operator or third parties, and all rights, titles, and interests in and to such property will remain (as between the parties) solely with the Operator. All trademarks, service marks, graphics, and logos used in connection with the Avail Space Application and Services, are trademarks or registered trademarks of the Operator or its licensors.\n\nOther trademarks, service marks, graphics, and logos used in connection with the Avail Space Application and Services may be the trademarks of other third parties. Your use of the Avail Space Application and Services grants you no right or license to reproduce or otherwise use any of the Operator or third-party trademarks.\n\n#### **Limitation of liability**\n\nTo the fullest extent permitted by applicable law, in no event will the Operator, its affiliates, directors, officers, employees, agents, suppliers, or licensors be liable to any person for any indirect, incidental, special, punitive, cover or consequential damages (including, without limitation, damages for lost profits, revenue, sales, goodwill, use of content, impact on business, business interruption, loss of anticipated savings, loss of business opportunity) however caused, under any theory of liability, including, without limitation, contract, tort, warranty, breach of statutory duty, negligence or otherwise, even if the liable party has been advised as to the possibility of such damages or could have foreseen such damages. \n\n#### **Indemnification**\n\nYou agree to indemnify and hold the Operator and its affiliates, directors, officers, employees, agents, suppliers, and licensors harmless from and against any liabilities, losses, damages, or costs, including reasonable attorneys’ fees, incurred in connection with or arising from any third-party allegations, claims, actions, disputes, or demands asserted against any of them as a result of or relating to your use of the Avail Space Application and Services or any willful misconduct on your part.\n\n#### **Severability**\n\nAll rights and restrictions contained in this Agreement may be exercised and shall be applicable and binding only to the extent that they do not violate any applicable laws and are intended to be limited to the extent necessary so that they will not render this Agreement illegal, invalid, or unenforceable. If any provision or portion of any provision of this Agreement shall be held to be illegal, invalid, or unenforceable by a court of competent jurisdiction, it is the intention of the parties that the remaining provisions or portions thereof shall constitute their Agreement with respect to the subject matter hereof, and all such remaining provisions or portions thereof shall remain in full force and effect.\n\n#### **Dispute resolution**\n\nThe formation, interpretation, and performance of this Agreement and any disputes arising out of it shall be governed by the substantive and procedural laws of the United Nations Convention without regard to its rules on conflicts or choice of law and, to the extent applicable, the laws of the United Nations Convention. The exclusive jurisdiction and venue for actions related to the subject matter hereof shall be the courts located in the United Nations Convention, and you hereby submit to the personal jurisdiction of such courts. You hereby waive any right to a jury trial in any proceeding arising out of or related to this Agreement. The United Nations Convention on Contracts for the International Sale of Goods does not apply to this Agreement.\n\n#### **Changes and amendments**\n\nWe reserve the right to modify this Agreement or its terms related to the Avail Space Application and Services at any time at our discretion. When we do, we will revise the updated date at the bottom of this page. We may also provide notice to you in other ways at our discretion, such as through the contact information you have provided.\n\nAn updated version of this Agreement will be effective immediately upon the posting of the revised Agreement unless otherwise specified. Your continued use of the Avail Space Application and Services after the effective date of the revised Agreement (or such other act specified at that time) will constitute your consent to those changes.\n\n#### **Acceptance of these terms**\n\nYou acknowledge that you have read this Agreement and agree to all its terms and conditions. By accessing and using the Avail Space Application and Services you agree to be bound by this Agreement. If you do not agree to abide by the terms of this Agreement, you are not authorized to access or use the Avail Space Application and Services.\n\n#### **Contacting us**\n\nIf you have any questions, concerns, or complaints regarding this Agreement, we encourage you to contact us using the details below:\n\n**Email:** [**agent@availspace.app**](mailto:agent@availspace.app)\n\nLast modified Jan 10, 2024." } diff --git a/packages/extension-web-ui/src/Popup/Account/AccountDetail.tsx b/packages/extension-web-ui/src/Popup/Account/AccountDetail.tsx index a932b1c2c3..55f1b67382 100644 --- a/packages/extension-web-ui/src/Popup/Account/AccountDetail.tsx +++ b/packages/extension-web-ui/src/Popup/Account/AccountDetail.tsx @@ -3,7 +3,6 @@ import { CloseIcon, Layout, PageWrapper } from '@subwallet/extension-web-ui/components'; import AccountAvatar from '@subwallet/extension-web-ui/components/Account/AccountAvatar'; -import InstructionContainer, { InstructionContentType } from '@subwallet/extension-web-ui/components/InstructionContainer'; import { ACCOUNT_EXPORT_MODAL } from '@subwallet/extension-web-ui/constants'; import { ScreenContext } from '@subwallet/extension-web-ui/contexts/ScreenContext'; import useDeleteAccount from '@subwallet/extension-web-ui/hooks/account/useDeleteAccount'; @@ -45,19 +44,6 @@ interface DetailFormState { [FormFieldName.NAME]: string; } -const instructionContents: InstructionContentType[] = [ - { - title: 'Why do I need to enter a password?', - description: 'For your wallet protection, SubWallet locks your wallet after 15 minutes of inactivity. You will need this password to unlock it.', - type: 'warning' - }, - { - title: 'Can I recover a password?', - description: 'The password is stored securely on your device. We will not be able to recover it for you, so make sure you remember it!', - type: 'warning' - } -]; - const Component: React.FC = (props: Props) => { const { className } = props; @@ -397,10 +383,6 @@ const Component: React.FC = (props: Props) => { {t('Remove account')} - - {isWebUI && - - } {isWebUI && ( diff --git a/packages/extension-web-ui/src/Popup/Account/AccountExport.tsx b/packages/extension-web-ui/src/Popup/Account/AccountExport.tsx index 1dc2464fef..9965f9940a 100644 --- a/packages/extension-web-ui/src/Popup/Account/AccountExport.tsx +++ b/packages/extension-web-ui/src/Popup/Account/AccountExport.tsx @@ -1,6 +1,7 @@ // Copyright 2019-2022 @subwallet/extension-web-ui authors & contributors // SPDX-License-Identifier: Apache-2.0 +import DefaultLogosMap from '@subwallet/extension-web-ui/assets/logo'; import { Layout, PageWrapper } from '@subwallet/extension-web-ui/components'; import AlertBox from '@subwallet/extension-web-ui/components/Alert'; import CloseIcon from '@subwallet/extension-web-ui/components/Icon/CloseIcon'; @@ -486,6 +487,7 @@ const Component: React.FC = (props: Props) => {
= (props: Props) => { const { t } = useTranslation(); const { goHome } = useDefaultNavigate(); + const { chainInfoMap } = useSelector((root: RootState) => root.chainStore); const supportedLedger = useGetSupportedLedger(); const onComplete = useCompleteCreateAccount(); @@ -53,9 +54,9 @@ const Component: React.FC = (props: Props) => { const networks = useMemo((): ChainItemType[] => supportedLedger.map((network) => ({ name: !network.isEthereum ? network.networkName.replace(' network', '') : network.networkName, slug: network.slug - })), [supportedLedger]); + })).filter((n) => !!chainInfoMap[n.slug]), [chainInfoMap, supportedLedger]); - const [chain, setChain] = useState(supportedLedger[0].slug); + const [chain, setChain] = useState('ethereum'); const [ledgerAccounts, setLedgerAccounts] = useState>([]); const [firstStep, setFirstStep] = useState(ledgerAccounts.length === 0); const [page, setPage] = useState(0); diff --git a/packages/extension-web-ui/src/Popup/Account/ConnectQrSigner/ConnectPolkadotVault.tsx b/packages/extension-web-ui/src/Popup/Account/ConnectQrSigner/ConnectPolkadotVault.tsx index ea7612e901..ccd3b1362a 100644 --- a/packages/extension-web-ui/src/Popup/Account/ConnectQrSigner/ConnectPolkadotVault.tsx +++ b/packages/extension-web-ui/src/Popup/Account/ConnectQrSigner/ConnectPolkadotVault.tsx @@ -16,7 +16,7 @@ const Component: React.FC = () => { return ( { + const types = {} as Record; + + Object.values(tokens).forEach((info) => { + if (!chainInfoMap[info.network]) { + return; + } + + if (!types[info.support]) { + types[info.support] = []; + } + + types[info.support].push(info.network); + }); + + if (types.ETHEREUM && types.SUBSTRATE) { + return 'ALL'; + } else { + return types.ETHEREUM ? 'ETHEREUM' : 'SUBSTRATE'; + } + }, [chainInfoMap, tokens]); + const filterAccountType = useMemo((): AccountType => { if (currentSymbol) { let result: AccountType = '' as AccountType; @@ -297,9 +320,9 @@ function Component ({ className, modalContent, slug }: Props) { return result; } else { - return 'ALL'; + return supportAccountType; } - }, [currentSymbol, tokens]); + }, [currentSymbol, supportAccountType, tokens]); const accountsFilter = useCallback((account: AccountJson) => { if (isAccountAll(account.address)) { diff --git a/packages/extension-web-ui/src/Popup/Confirmations/parts/Sign/Substrate.tsx b/packages/extension-web-ui/src/Popup/Confirmations/parts/Sign/Substrate.tsx index 97ad3a7add..1c00b6292d 100644 --- a/packages/extension-web-ui/src/Popup/Confirmations/parts/Sign/Substrate.tsx +++ b/packages/extension-web-ui/src/Popup/Confirmations/parts/Sign/Substrate.tsx @@ -79,11 +79,11 @@ const Component: React.FC = (props: Props) => { const genesisHash = useMemo(() => { if (isSubstrateMessage(payload)) { - return chainInfoMap.polkadot.substrateInfo?.genesisHash || ''; + return chainInfoMap.polkadot?.substrateInfo?.genesisHash || ''; } else { return payload.genesisHash.toHex(); } - }, [chainInfoMap.polkadot.substrateInfo?.genesisHash, payload]); + }, [chainInfoMap.polkadot?.substrateInfo?.genesisHash, payload]); const chain = useGetChainInfoByGenesisHash(genesisHash); diff --git a/packages/extension-web-ui/src/Popup/Confirmations/variants/NotSupportWCConfirmation.tsx b/packages/extension-web-ui/src/Popup/Confirmations/variants/NotSupportWCConfirmation.tsx index 66cd814a25..7724e85000 100644 --- a/packages/extension-web-ui/src/Popup/Confirmations/variants/NotSupportWCConfirmation.tsx +++ b/packages/extension-web-ui/src/Popup/Confirmations/variants/NotSupportWCConfirmation.tsx @@ -43,7 +43,7 @@ const Component: React.FC = (props: Props) => {
diff --git a/packages/extension-web-ui/src/Popup/Confirmations/variants/Transaction/variants/Bond.tsx b/packages/extension-web-ui/src/Popup/Confirmations/variants/Transaction/variants/Bond.tsx index a2e418a885..15a0cbaa7e 100644 --- a/packages/extension-web-ui/src/Popup/Confirmations/variants/Transaction/variants/Bond.tsx +++ b/packages/extension-web-ui/src/Popup/Confirmations/variants/Transaction/variants/Bond.tsx @@ -34,8 +34,8 @@ const Component: React.FC = (props: Props) => { > (({ theme: { token } }: Props) '.__block-divider': { height: 116, - width: 1, + width: 2, backgroundColor: token.colorBgDivider, marginTop: token.marginSM }, diff --git a/packages/extension-web-ui/src/Popup/Home/Earning/shared/desktop/Toolbar.tsx b/packages/extension-web-ui/src/Popup/Home/Earning/shared/desktop/Toolbar.tsx index 1403266573..1ed9dc0986 100644 --- a/packages/extension-web-ui/src/Popup/Home/Earning/shared/desktop/Toolbar.tsx +++ b/packages/extension-web-ui/src/Popup/Home/Earning/shared/desktop/Toolbar.tsx @@ -2,13 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import Search from '@subwallet/extension-web-ui/components/Search'; -import { useTranslation } from '@subwallet/extension-web-ui/hooks'; import { ThemeProps } from '@subwallet/extension-web-ui/types'; -import { openInNewTab } from '@subwallet/extension-web-ui/utils'; -import { Button, Icon } from '@subwallet/react-ui'; +import { Icon } from '@subwallet/react-ui'; import CN from 'classnames'; -import { FadersHorizontal, Question } from 'phosphor-react'; -import React, { useCallback } from 'react'; +import { FadersHorizontal } from 'phosphor-react'; +import React from 'react'; import styled from 'styled-components'; interface Props extends ThemeProps{ @@ -20,12 +18,6 @@ interface Props extends ThemeProps{ } function Component ({ className, extraActionNode, inputPlaceholder, onClickFilter, onSearch, searchValue }: Props): React.ReactElement { - const { t } = useTranslation(); - - const onClickHelp = useCallback(() => { - openInNewTab('https://docs.subwallet.app/main/web-dashboard-user-guide/earning/faqs')(); - }, []); - return (
)} - extraButton={ - ( - <> - - - {extraActionNode} - - ) - } + extraButton={(<>{extraActionNode})} onClickActionBtn={onClickFilter} onSearch={onSearch} placeholder={inputPlaceholder} diff --git a/packages/extension-web-ui/src/Popup/Home/Tokens/DetailList.tsx b/packages/extension-web-ui/src/Popup/Home/Tokens/DetailList.tsx index 8a423ad5e1..74277dd591 100644 --- a/packages/extension-web-ui/src/Popup/Home/Tokens/DetailList.tsx +++ b/packages/extension-web-ui/src/Popup/Home/Tokens/DetailList.tsx @@ -581,11 +581,22 @@ const Tokens = styled(WrapperComponent)(({ theme: { extendToken, tok right: 0, display: 'flex', alignItems: 'center', - backgroundImage: extendToken.tokensScreenInfoBackgroundColor, transition: 'opacity, padding-top 0.27s ease', '&.-is-shrink': { height: 128 + }, + + '&:before': { + content: '""', + position: 'absolute', + top: 0, + left: 0, + right: 0, + bottom: '50%', + backgroundImage: extendToken.tokensScreenSuccessBackgroundColor, + filter: 'blur(110.5px)', + opacity: 0.45 } }, diff --git a/packages/extension-web-ui/src/Popup/Home/Tokens/index.tsx b/packages/extension-web-ui/src/Popup/Home/Tokens/index.tsx index 49cc84db4a..5ab8062bd9 100644 --- a/packages/extension-web-ui/src/Popup/Home/Tokens/index.tsx +++ b/packages/extension-web-ui/src/Popup/Home/Tokens/index.tsx @@ -533,7 +533,6 @@ const Tokens = styled(WrapperComponent)(({ theme: { extendToken, t }, '.__upper-block-wrapper': { - backgroundColor: token.colorBgDefault, position: 'absolute', paddingTop: '32px', height: 210, @@ -543,15 +542,22 @@ const Tokens = styled(WrapperComponent)(({ theme: { extendToken, t width: '100%', display: 'flex', alignItems: 'center', - backgroundImage: extendToken.tokensScreenSuccessBackgroundColor, transition: 'opacity, padding-top 0.27s ease', '&.-is-shrink': { height: 104 }, - '&.-decrease': { - backgroundImage: extendToken.tokensScreenDangerBackgroundColor + '&:before': { + content: '""', + position: 'absolute', + top: 0, + left: 0, + right: 0, + bottom: '50%', + backgroundImage: extendToken.tokensScreenSuccessBackgroundColor, + filter: 'blur(110.5px)', + opacity: 0.45 } }, diff --git a/packages/extension-web-ui/src/Popup/Keyring/Login.tsx b/packages/extension-web-ui/src/Popup/Keyring/Login.tsx index 5876d54706..b077fc7599 100644 --- a/packages/extension-web-ui/src/Popup/Keyring/Login.tsx +++ b/packages/extension-web-ui/src/Popup/Keyring/Login.tsx @@ -86,8 +86,8 @@ const Component: React.FC = ({ className }: Props) => {
diff --git a/packages/extension-web-ui/src/Popup/Root.tsx b/packages/extension-web-ui/src/Popup/Root.tsx index 2f60354d55..c925de87fd 100644 --- a/packages/extension-web-ui/src/Popup/Root.tsx +++ b/packages/extension-web-ui/src/Popup/Root.tsx @@ -8,6 +8,7 @@ import BaseWeb from '@subwallet/extension-web-ui/components/Layout/base/BaseWeb' import { Logo2D } from '@subwallet/extension-web-ui/components/Logo'; import { DEFAULT_ROUTER_PATH } from '@subwallet/extension-web-ui/constants/router'; import { DataContext } from '@subwallet/extension-web-ui/contexts/DataContext'; +import { InjectContext } from '@subwallet/extension-web-ui/contexts/InjectContext'; import { ScreenContext } from '@subwallet/extension-web-ui/contexts/ScreenContext'; import { WalletModalContext } from '@subwallet/extension-web-ui/contexts/WalletModalContext'; import { useSubscribeLanguage } from '@subwallet/extension-web-ui/hooks'; @@ -95,6 +96,7 @@ interface RedirectProps { } function DefaultRoute ({ children }: {children: React.ReactNode}): React.ReactElement { + const { loadingInject } = useContext(InjectContext); const dataContext = useContext(DataContext); const screenContext = useContext(ScreenContext); const location = useLocation(); @@ -264,12 +266,15 @@ function DefaultRoute ({ children }: {children: React.ReactNode}): React.ReactEl } }, [currentAccount, initAccount]); - if (rootLoading || redirectTarget.redirect) { - return <>{redirectTarget.redirect && }; + if (rootLoading || loadingInject) { + return (<>); } else { - return - {children} - ; + return (<> + {redirectTarget.redirect && } + + {children} + + ); } } diff --git a/packages/extension-web-ui/src/Popup/Settings/Security/index.tsx b/packages/extension-web-ui/src/Popup/Settings/Security/index.tsx index 19854d7e99..de289d8af1 100644 --- a/packages/extension-web-ui/src/Popup/Settings/Security/index.tsx +++ b/packages/extension-web-ui/src/Popup/Settings/Security/index.tsx @@ -16,7 +16,7 @@ import { noop } from '@subwallet/extension-web-ui/utils'; import { isNoAccount } from '@subwallet/extension-web-ui/utils/account/account'; import { BackgroundIcon, Icon, ModalContext, SettingItem, Switch } from '@subwallet/react-ui'; import CN from 'classnames'; -import { Camera, CaretRight, CheckCircle, GlobeHemisphereEast, Key, LockKeyOpen, LockLaminated, ShieldStar } from 'phosphor-react'; +import { Camera, CaretRight, CheckCircle, GlobeHemisphereEast, ShieldStar } from 'phosphor-react'; import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useSelector } from 'react-redux'; @@ -89,29 +89,29 @@ const Component: React.FC = (props: Props) => { } }), [t]); - const items = useMemo((): SecurityItem[] => [ - { - icon: Key, - key: SecurityType.WALLET_PASSWORD, - title: t('Change wallet password'), - url: '/keyring/change-password', - disabled: noAccount - }, - { - icon: LockLaminated, - key: SecurityType.AUTO_LOCK, - title: t('Wallet auto-lock'), - url: '', - disabled: false - }, - { - icon: LockKeyOpen, - key: SecurityType.UNLOCK_TYPE, - title: t('Authenticate with password'), - url: '', - disabled: false - } - ], [noAccount, t]); + // const items = useMemo((): SecurityItem[] => [ + // { + // icon: Key, + // key: SecurityType.WALLET_PASSWORD, + // title: t('Change wallet password'), + // url: '/keyring/change-password', + // disabled: noAccount + // }, + // { + // icon: LockLaminated, + // key: SecurityType.AUTO_LOCK, + // title: t('Wallet auto-lock'), + // url: '', + // disabled: false + // }, + // { + // icon: LockKeyOpen, + // key: SecurityType.UNLOCK_TYPE, + // title: t('Authenticate with password'), + // url: '', + // disabled: false + // } + // ], [noAccount, t]); const websiteAccessItem = useMemo((): SecurityItem => ({ icon: GlobeHemisphereEast, @@ -285,9 +285,6 @@ const Component: React.FC = (props: Props) => { title={t('Security settings')} >
-
- {items.map(onRenderItem)} -
{t('Website access')} diff --git a/packages/extension-web-ui/src/Popup/Settings/index.tsx b/packages/extension-web-ui/src/Popup/Settings/index.tsx index 4816c9f9c2..609023df33 100644 --- a/packages/extension-web-ui/src/Popup/Settings/index.tsx +++ b/packages/extension-web-ui/src/Popup/Settings/index.tsx @@ -2,23 +2,20 @@ // SPDX-License-Identifier: Apache-2.0 import DefaultLogosMap from '@subwallet/extension-web-ui/assets/logo'; -import SwLogosMap from '@subwallet/extension-web-ui/assets/subwallet'; import { BaseModal, PageWrapper } from '@subwallet/extension-web-ui/components'; -import { EXTENSION_VERSION, SUPPORT_MAIL, TERMS_OF_SERVICE_URL, TWITTER_URL, WEB_BUILD_NUMBER, WEBSITE_URL, WIKI_URL } from '@subwallet/extension-web-ui/constants/common'; +import { EXTENSION_VERSION, SUPPORT_MAIL, TWITTER_URL, WEB_BUILD_NUMBER } from '@subwallet/extension-web-ui/constants/common'; import { ScreenContext } from '@subwallet/extension-web-ui/contexts/ScreenContext'; import { WebUIContext } from '@subwallet/extension-web-ui/contexts/WebUIContext'; -import useNotification from '@subwallet/extension-web-ui/hooks/common/useNotification'; import useTranslation from '@subwallet/extension-web-ui/hooks/common/useTranslation'; -import useUILock from '@subwallet/extension-web-ui/hooks/common/useUILock'; import useIsPopup from '@subwallet/extension-web-ui/hooks/dom/useIsPopup'; import useDefaultNavigate from '@subwallet/extension-web-ui/hooks/router/useDefaultNavigate'; import { windowOpen } from '@subwallet/extension-web-ui/messaging'; import { Theme, ThemeProps } from '@subwallet/extension-web-ui/types'; import { openInNewTab } from '@subwallet/extension-web-ui/utils'; -import { BackgroundIcon, Button, ButtonProps, Icon, Image, ModalContext, SettingItem, SwHeader, SwIconProps } from '@subwallet/react-ui'; +import { BackgroundIcon, ButtonProps, Icon, Image, ModalContext, SettingItem, SwHeader, SwIconProps } from '@subwallet/react-ui'; import CN from 'classnames'; -import { ArrowsOut, ArrowSquareOut, Book, BookBookmark, CaretRight, ChatTeardropText, Coin, EnvelopeSimple, FrameCorners, Globe, GlobeHemisphereEast, Lock, ShareNetwork, ShieldCheck, X } from 'phosphor-react'; -import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react'; +import { ArrowsOut, ArrowSquareOut, BookBookmark, CaretRight, ChatTeardropText, Coin, EnvelopeSimple, FrameCorners, GlobeHemisphereEast, ShareNetwork, ShieldCheck, X } from 'phosphor-react'; +import React, { useCallback, useContext, useEffect, useMemo } from 'react'; import { Outlet, useLocation, useNavigate } from 'react-router-dom'; import styled, { useTheme } from 'styled-components'; @@ -76,38 +73,13 @@ function Component ({ className = '' }: Props): React.ReactElement { const navigate = useNavigate(); const { token } = useTheme() as Theme; const isPopup = useIsPopup(); - const notify = useNotification(); const location = useLocation(); const { goHome } = useDefaultNavigate(); const { t } = useTranslation(); - const [locking, setLocking] = useState(false); const { isWebUI } = useContext(ScreenContext); const { setTitle } = useContext(WebUIContext); const { activeModal, inactiveModal } = useContext(ModalContext); - const { isUILocked, lock, unlock } = useUILock(); - - const onLock = useCallback(() => { - if (isUILocked) { - unlock(); - goHome(); - } else { - setLocking(true); - lock() - .then(() => { - goHome(); - }) - .catch((e: Error) => { - notify({ - message: e.message, - type: 'error' - }); - }).finally(() => { - setLocking(false); - }); - } - }, [goHome, isUILocked, lock, notify, unlock]); - // todo: i18n all titles, labels below const SettingGroupItemType = useMemo((): SettingGroupItemType[] => ([ { @@ -193,17 +165,17 @@ function Component ({ className = '' }: Props): React.ReactElement { rightIcon: ArrowSquareOut, title: t('Contact support'), onClick: () => { - window.open(`${SUPPORT_MAIL}?subject=[WebApp - In-app support]`, '_self'); + window.open(`${SUPPORT_MAIL}?subject=[Avail Space In-app Support]`, '_self'); } }, - { - key: 'user-manual', - leftIcon: Book, - leftIconBgColor: token['green-6'], - rightIcon: ArrowSquareOut, - title: t('User guide'), - onClick: openInNewTab(WIKI_URL) - }, + // { + // key: 'user-manual', + // leftIcon: Book, + // leftIconBgColor: token['green-6'], + // rightIcon: ArrowSquareOut, + // title: t('User guide'), + // onClick: openInNewTab(WIKI_URL) + // }, { key: 'request-a-feature', leftIcon: ChatTeardropText, @@ -211,7 +183,7 @@ function Component ({ className = '' }: Props): React.ReactElement { rightIcon: ArrowSquareOut, title: t('Request a feature'), onClick: () => { - window.open(`${SUPPORT_MAIL}?subject=[SubWallet In-app Feedback]`, '_self'); + window.open(`${SUPPORT_MAIL}?subject=[Avail Space In-app Feedback]`, '_self'); } }, { @@ -221,13 +193,13 @@ function Component ({ className = '' }: Props): React.ReactElement { className='__subwallet-logo' height={24} shape='squircle' - src={SwLogosMap.subwallet} + src={'/images/avail/avail-icon.png'} width={24} /> ), leftIconBgColor: 'transparent', rightIcon: CaretRight, - title: t('About SubWallet'), + title: t('About Avail Space'), onClick: () => { activeModal(modalId); } @@ -239,22 +211,22 @@ function Component ({ className = '' }: Props): React.ReactElement { const aboutSubwalletType = useMemo(() => { return [ - { - key: 'website', - leftIcon: Globe, - rightIcon: ArrowSquareOut, - leftIconBgColor: token['purple-7'], - title: t('Website'), - onClick: openInNewTab(WEBSITE_URL) - }, - { - key: 'terms-of-use', - leftIcon: BookBookmark, - rightIcon: ArrowSquareOut, - leftIconBgColor: token['volcano-7'], - title: t('Terms of use'), - onClick: openInNewTab(TERMS_OF_SERVICE_URL) - }, + // { + // key: 'website', + // leftIcon: Globe, + // rightIcon: ArrowSquareOut, + // leftIconBgColor: token['purple-7'], + // title: t('Website'), + // onClick: openInNewTab(WEBSITE_URL) + // }, + // { + // key: 'terms-of-use', + // leftIcon: BookBookmark, + // rightIcon: ArrowSquareOut, + // leftIconBgColor: token['volcano-7'], + // title: t('Terms of use'), + // onClick: openInNewTab(TERMS_OF_SERVICE_URL) + // }, { key: 'x', leftIcon: ( @@ -343,24 +315,8 @@ function Component ({ className = '' }: Props): React.ReactElement { }) } - -
- SubWallet v {EXTENSION_VERSION} - {WEB_BUILD_NUMBER} + Avail Space v{EXTENSION_VERSION} - {WEB_BUILD_NUMBER}
@@ -369,7 +325,7 @@ function Component ({ className = '' }: Props): React.ReactElement { className={CN(className, 'about-subwallet-modal')} id={modalId} onCancel={closeModal} - title={t('About SubWallet')} + title={t('About Avail Space')} > {aboutSubwalletType.map((item) => (
{ const [checkCompoundLoading, setCheckCompoundLoading] = useState(true); const [submitString, setSubmitString] = useState(); const [connectionError, setConnectionError] = useState(); - // const [, setCanMint] = useState(false); const [submitLoading, setSubmitLoading] = useState(false); - // const [checkMintLoading, setCheckMintLoading] = useState(false); const [isFormInvalid, setIsFormInvalid] = useState(true); const chainState = useFetchChainState(poolInfo?.chain || ''); @@ -178,7 +175,6 @@ const Component = ({ className }: ComponentProps) => { const isDisabledButton = useMemo( () => - // checkMintLoading || stepLoading || !!connectionError || !amountValue || diff --git a/packages/extension-web-ui/src/Popup/Transaction/variants/SendFund.tsx b/packages/extension-web-ui/src/Popup/Transaction/variants/SendFund.tsx index 58225f0f2a..276885b30a 100644 --- a/packages/extension-web-ui/src/Popup/Transaction/variants/SendFund.tsx +++ b/packages/extension-web-ui/src/Popup/Transaction/variants/SendFund.tsx @@ -142,6 +142,10 @@ function getTokenAvailableDestinations (tokenSlug: string, xcmRefMap: Record { const { t } = useTranslation(); @@ -51,8 +44,8 @@ function Component ({ className }: Props): React.ReactElement { const { enableInject, loadingInject, selectWallet } = useContext(InjectContext); const { accounts, isNoAccount } = useSelector((root: RootState) => root.accountState); - const autoGenAttachReadonlyAccountName = useGetDefaultAccountName(); + const [, setSelectedAccountTypes] = useLocalStorage(SELECTED_ACCOUNT_TYPE, DEFAULT_ACCOUNT_TYPES); const [_returnPath, setReturnStorage] = useLocalStorage(CREATE_RETURN, DEFAULT_ROUTER_PATH); const [modalIdAfterConfirm, setModalIdAfterConfirm] = useState(''); @@ -127,41 +120,6 @@ function Component ({ className }: Props): React.ReactElement { [accounts, t] ); - const buttonList = useMemo((): WelcomeButtonItem[] => [ - { - description: t('Connect to your existing wallet'), - icon: PuzzlePiece, - id: CONNECT_EXTENSION, - schema: 'primary', - title: t('Connect wallet'), - loading: loadingInject - }, - { - description: t('Create a new account with SubWallet'), - icon: PlusCircle, - id: CREATE_ACCOUNT_MODAL, - schema: 'secondary', - title: t('Create a new account'), - loading: false - }, - { - description: t('Import an existing account'), - icon: FileArrowDown, - id: IMPORT_ACCOUNT_MODAL, - schema: 'secondary', - title: t('Import an account'), - loading: false - }, - { - description: t('Attach an account without private key'), - icon: Swatches, - id: ATTACH_ACCOUNT_MODAL, - schema: 'secondary', - title: t('Attach an account'), - loading: false - } - ], [t, loadingInject]); - const openModal = useCallback((id: string) => { return () => { if (id === CONNECT_EXTENSION) { @@ -243,10 +201,11 @@ function Component ({ className }: Props): React.ReactElement { }, [isNoAccount, navigate, returnPath, setReturnStorage]); useEffect(() => { - if (isMobile && !AutoConnect.ignore) { + if (isMobile && !tryToConnect && !AutoConnect.ignore) { const installedWallet = Object.values(PREDEFINED_WALLETS).find((w) => (w.supportMobile && checkHasInjected(w.key))); if (installedWallet) { + tryToConnect = true; enableInject(installedWallet.key); } } @@ -256,7 +215,7 @@ function Component ({ className }: Props): React.ReactElement { - {!isWebUI &&
} +
@@ -264,58 +223,58 @@ function Component ({ className }: Props): React.ReactElement { isWebUI ? ( ) : ( ) }
- { - isWebUI && (
{t('Welcome to SubWallet!')}
) - } +
{t('WELCOME TO AVAIL SPACE')}
- {t('Choose how you\'d like to set up your wallet')} + {t('Start exploring blockchain applications in seconds')}
- {buttonList.map((item) => ( - - ))} + +
-
@@ -366,12 +325,12 @@ function Component ({ className }: Props): React.ReactElement { {isWebUI && ( )} - + ); } -const Welcome = styled(Component)(({ theme: { token } }: Props) => { +const Welcome = styled(Component)(({ theme: { extendToken, token } }: Props) => { return { position: 'relative', @@ -381,18 +340,16 @@ const Welcome = styled(Component)(({ theme: { token } }: Props) => { justifyContent: 'center' }, - '.bg-image': { - backgroundImage: 'url("/images/subwallet/welcome-background.png")', - backgroundRepeat: 'no-repeat', - backgroundPosition: 'top', - backgroundSize: 'contain', - height: '100%', - position: 'absolute', - width: '100%', - left: 0, - top: 0, - opacity: 0.1, - zIndex: -1 + '.welcome-bg-image': { + position: 'fixed', + top: '-10vh', + left: '0', + right: '-20vw', + height: '30vh', + zIndex: 0, + transitionDuration: 'background-color 0.3s ease', + filter: 'blur(110.5px)', + background: extendToken.tokensScreenInfoBackgroundColor }, '.brand-container': { @@ -403,19 +360,19 @@ const Welcome = styled(Component)(({ theme: { token } }: Props) => { height: 2, backgroundColor: token.colorBgDivider, opacity: 0.8, - width: '100%' + width: '100%', + display: 'none' }, '.body-container': { padding: `0 ${token.padding}px`, textAlign: 'center', - opacity: 0.999, // Hot fix show wrong opacity in browser '.title': { - marginTop: token.margin, + marginTop: token.marginXL, fontWeight: token.fontWeightStrong, - fontSize: token.fontSizeHeading3, - lineHeight: token.lineHeightHeading3, + fontSize: token.fontSizeHeading1, + lineHeight: token.lineHeightHeading1, color: token.colorTextBase }, @@ -443,40 +400,13 @@ const Welcome = styled(Component)(({ theme: { token } }: Props) => { '.buttons-container': { '.buttons': { - display: 'flex', - flexDirection: 'column', - gap: token.sizeXS - } - }, - - '.welcome-import-button': { - height: 'auto', - - '.welcome-import-icon': { - height: token.sizeLG, - width: token.sizeLG, - marginLeft: token.sizeMD - token.size + fontSize: 16 }, - - '.welcome-import-button-content': { - display: 'flex', - flexDirection: 'column', - gap: token.sizeXXS, - fontWeight: token.fontWeightStrong, - padding: `${token.paddingSM - 1}px ${token.paddingLG}px`, - textAlign: 'start', - - '.welcome-import-button-title': { - fontSize: token.fontSizeHeading5, - lineHeight: token.lineHeightHeading5, - color: token.colorTextBase - }, - - '.welcome-import-button-description': { - fontSize: token.fontSizeHeading6, - lineHeight: token.lineHeightHeading6, - color: token.colorTextLabel - } + '.ant-btn': { + paddingLeft: token.paddingXL, + paddingRight: token.paddingXL, + marginLeft: token.marginSM, + marginRight: token.marginSM } }, @@ -515,6 +445,10 @@ const Welcome = styled(Component)(({ theme: { token } }: Props) => { marginTop: 24 }, + '.divider': { + display: 'block' + }, + '.title': { marginBottom: token.marginXS }, @@ -525,48 +459,15 @@ const Welcome = styled(Component)(({ theme: { token } }: Props) => { '.buttons-container': { marginBottom: token.marginXL, - marginTop: 72, + marginTop: 36, width: '100%', '.divider': { - marginTop: token.marginLG + marginTop: 44 }, '.buttons': { - display: 'grid', - gridTemplateRows: '1fr 1fr', - gridTemplateColumns: '1fr 1fr', - gap: token.sizeMS, - - '.ant-btn:not(.-icon-only) .ant-btn-loading-icon>.anticon': { - fontSize: 24, - height: 24, - width: 24, - marginLeft: 4, - marginRight: 0 - }, - - [`.type-${CREATE_ACCOUNT_MODAL}`]: { - color: token['green-6'] - }, - - [`.type-${IMPORT_ACCOUNT_MODAL}`]: { - color: token['orange-7'] - }, - - [`.type-${ATTACH_ACCOUNT_MODAL}`]: { - color: token['magenta-6'] - }, - - [`.type-${CONNECT_EXTENSION}`]: { - color: token.colorSuccess, - order: -1 - }, - - '.welcome-import-button': { - width: '100%', - paddingRight: 14 - } + } }, @@ -584,6 +485,23 @@ const Welcome = styled(Component)(({ theme: { token } }: Props) => { paddingBottom: 32 } } + }, + '@media (max-width: 560px)': { + '.buttons .ant-btn': { + display: 'block', + width: 300, + marginLeft: 'auto', + marginRight: 'auto', + marginBottom: token.margin + }, + + '.body-container .title': { + fontSize: 24 + }, + + '.body-container .sub-title': { + fontSize: 14 + } } }; }); diff --git a/packages/extension-web-ui/src/Popup/router.tsx b/packages/extension-web-ui/src/Popup/router.tsx index 79629d715f..0ca2afe280 100644 --- a/packages/extension-web-ui/src/Popup/router.tsx +++ b/packages/extension-web-ui/src/Popup/router.tsx @@ -1,7 +1,6 @@ // Copyright 2019-2022 @subwallet/extension-ui authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { PHISHING_PAGE_REDIRECT } from '@subwallet/extension-base/defaults'; import { PageWrapper } from '@subwallet/extension-web-ui/components'; import ErrorFallback from '@subwallet/extension-web-ui/Popup/ErrorFallback'; import { Root } from '@subwallet/extension-web-ui/Popup/Root'; @@ -50,7 +49,7 @@ export class LazyLoader { } } -const PhishingDetected = new LazyLoader('PhishingDetected', () => import('@subwallet/extension-web-ui/Popup/PhishingDetected')); +// const PhishingDetected = new LazyLoader('PhishingDetected', () => import('@subwallet/extension-web-ui/Popup/PhishingDetected')); const Welcome = new LazyLoader('Welcome', () => import('@subwallet/extension-web-ui/Popup/Welcome')); const CreateDone = new LazyLoader('CreateDone', () => import('@subwallet/extension-web-ui/Popup/CreateDone')); const RedirectHandler = new LazyLoader('RedirectHandler', () => import('@subwallet/extension-web-ui/Popup/RedirectHandler')); @@ -68,7 +67,7 @@ const InscriptionItems = new LazyLoader('InscriptionItems', () => import('@subwa const InscriptionItemDetail = new LazyLoader('InscriptionItemDetail', () => import('@subwallet/extension-web-ui/Popup/Home/Inscriptions/InscriptionItemDetail')); const History = new LazyLoader('History', () => import('@subwallet/extension-web-ui/Popup/Home/History')); -const Crowdloans = new LazyLoader('Crowdloans', () => import('@subwallet/extension-web-ui/Popup/Home/Crowdloans')); +// const Crowdloans = new LazyLoader('Crowdloans', () => import('@subwallet/extension-web-ui/Popup/Home/Crowdloans')); const Home = new LazyLoader('Home', () => import('@subwallet/extension-web-ui/Popup/Home')); const Statistics = new LazyLoader('Statistics', () => import('@subwallet/extension-web-ui/Popup/Home/Statistics')); @@ -89,11 +88,11 @@ const SecurityList = new LazyLoader('SecurityList', () => import('@subwallet/ext const ManageWebsiteAccess = new LazyLoader('ManageWebsiteAccess', () => import('@subwallet/extension-web-ui/Popup/Settings/Security/ManageWebsiteAccess')); const ManageWebsiteAccessDetail = new LazyLoader('ManageWebsiteAccessDetail', () => import('@subwallet/extension-web-ui/Popup/Settings/Security/ManageWebsiteAccess/Detail')); -const NewSeedPhrase = new LazyLoader('NewSeedPhrase', () => import('@subwallet/extension-web-ui/Popup/Account/NewSeedPhrase')); -const ImportSeedPhrase = new LazyLoader('ImportSeedPhrase', () => import('@subwallet/extension-web-ui/Popup/Account/ImportSeedPhrase')); -const ImportPrivateKey = new LazyLoader('ImportPrivateKey', () => import('@subwallet/extension-web-ui/Popup/Account/ImportPrivateKey')); -const RestoreJson = new LazyLoader('RestoreJson', () => import('@subwallet/extension-web-ui/Popup/Account/RestoreJson')); -const ImportQrCode = new LazyLoader('ImportQrCode', () => import('@subwallet/extension-web-ui/Popup/Account/ImportQrCode')); +// const NewSeedPhrase = new LazyLoader('NewSeedPhrase', () => import('@subwallet/extension-web-ui/Popup/Account/NewSeedPhrase')); +// const ImportSeedPhrase = new LazyLoader('ImportSeedPhrase', () => import('@subwallet/extension-web-ui/Popup/Account/ImportSeedPhrase')); +// const ImportPrivateKey = new LazyLoader('ImportPrivateKey', () => import('@subwallet/extension-web-ui/Popup/Account/ImportPrivateKey')); +// const RestoreJson = new LazyLoader('RestoreJson', () => import('@subwallet/extension-web-ui/Popup/Account/RestoreJson')); +// const ImportQrCode = new LazyLoader('ImportQrCode', () => import('@subwallet/extension-web-ui/Popup/Account/ImportQrCode')); const AttachReadOnly = new LazyLoader('AttachReadOnly', () => import('@subwallet/extension-web-ui/Popup/Account/AttachReadOnly')); const ConnectPolkadotVault = new LazyLoader('ConnectPolkadotVault', () => import('@subwallet/extension-web-ui/Popup/Account/ConnectQrSigner/ConnectPolkadotVault')); const ConnectKeystone = new LazyLoader('ConnectKeystone', () => import('@subwallet/extension-web-ui/Popup/Account/ConnectQrSigner/ConnectKeystone')); @@ -105,7 +104,7 @@ const ChangePassword = new LazyLoader('ChangePassword', () => import('@subwallet const ApplyMasterPassword = new LazyLoader('ApplyMasterPassword', () => import('@subwallet/extension-web-ui/Popup/Keyring/ApplyMasterPassword')); const AccountDetail = new LazyLoader('AccountDetail', () => import('@subwallet/extension-web-ui/Popup/Account/AccountDetail')); -const AccountExport = new LazyLoader('AccountExport', () => import('@subwallet/extension-web-ui/Popup/Account/AccountExport')); +// const AccountExport = new LazyLoader('AccountExport', () => import('@subwallet/extension-web-ui/Popup/Account/AccountExport')); const Transaction = new LazyLoader('Transaction', () => import('@subwallet/extension-web-ui/Popup/Transaction/Transaction')); const TransactionDone = new LazyLoader('TransactionDone', () => import('@subwallet/extension-web-ui/Popup/TransactionDone')); @@ -116,7 +115,7 @@ const Unstake = new LazyLoader('Unstake', () => import('@subwallet/extension-web const CancelUnstake = new LazyLoader('CancelUnstake', () => import('@subwallet/extension-web-ui/Popup/Transaction/variants/CancelUnstake')); const ClaimReward = new LazyLoader('ClaimReward', () => import('@subwallet/extension-web-ui/Popup/Transaction/variants/ClaimReward')); const Withdraw = new LazyLoader('Withdraw', () => import('@subwallet/extension-web-ui/Popup/Transaction/variants/Withdraw')); -const SwapTransaction = new LazyLoader('SwapTransaction', () => import('@subwallet/extension-web-ui/Popup/Transaction/variants/Swap')); +// const SwapTransaction = new LazyLoader('SwapTransaction', () => import('@subwallet/extension-web-ui/Popup/Transaction/variants/Swap')); // Wallet Connect const ConnectWalletConnect = new LazyLoader('ConnectWalletConnect', () => import('@subwallet/extension-web-ui/Popup/WalletConnect/ConnectWalletConnect')); @@ -125,7 +124,7 @@ const ConnectionDetail = new LazyLoader('ConnectionDetail', () => import('@subwa // DApps -const DApps = new LazyLoader('DApps', () => import('@subwallet/extension-web-ui/Popup/DApps')); +// const DApps = new LazyLoader('DApps', () => import('@subwallet/extension-web-ui/Popup/DApps')); const EarningEntry = new LazyLoader('EarningEntry', () => import('@subwallet/extension-web-ui/Popup/Home/Earning/EarningEntry')); const EarningPools = new LazyLoader('EarningPools', () => import('@subwallet/extension-web-ui/Popup/Home/Earning/EarningPools')); @@ -137,11 +136,11 @@ const EarningPreviewOutlet = new LazyLoader('EarningPreviewOutlet', () => import // const EarningDoneOutlet = new LazyLoader('EarningDoneOutlet', () => import('@subwallet/extension-web-ui/Popup/EarningDone/Outlet')); // const EarningDoneContent = new LazyLoader('EarningDoneContent', () => import('@subwallet/extension-web-ui/Popup/EarningDone/Content')); -const CrowdloanUnlockCampaign = new LazyLoader('CrowdloanUnlockCampaign', () => import('@subwallet/extension-web-ui/Popup/CrowdloanUnlockCampaign')); -const CheckCrowdloanContributions = new LazyLoader('CrowdloanContributionsResult', () => import('@subwallet/extension-web-ui/Popup/CrowdloanUnlockCampaign/CheckCrowdloanContributions')); -const CrowdloanContributionsResult = new LazyLoader('CrowdloanContributionsResult', () => import('@subwallet/extension-web-ui/Popup/CrowdloanUnlockCampaign/CrowdloanContributionsResult')); +// const CrowdloanUnlockCampaign = new LazyLoader('CrowdloanUnlockCampaign', () => import('@subwallet/extension-web-ui/Popup/CrowdloanUnlockCampaign')); +// const CheckCrowdloanContributions = new LazyLoader('CrowdloanContributionsResult', () => import('@subwallet/extension-web-ui/Popup/CrowdloanUnlockCampaign/CheckCrowdloanContributions')); +// const CrowdloanContributionsResult = new LazyLoader('CrowdloanContributionsResult', () => import('@subwallet/extension-web-ui/Popup/CrowdloanUnlockCampaign/CrowdloanContributionsResult')); -const MissionPool = new LazyLoader('MissionPool', () => import('@subwallet/extension-web-ui/Popup/MissionPool')); +// const MissionPool = new LazyLoader('MissionPool', () => import('@subwallet/extension-web-ui/Popup/MissionPool')); /* 404 */ @@ -201,7 +200,7 @@ export const router = createBrowserRouter([ InscriptionItemDetail.generateRouterObject('item-detail') ] }, - Crowdloans.generateRouterObject('crowdloans'), + // Crowdloans.generateRouterObject('crowdloans'), { path: 'earning', element: , @@ -211,10 +210,10 @@ export const router = createBrowserRouter([ EarningPositionDetail.generateRouterObject('position-detail') ] }, - MissionPool.generateRouterObject('mission-pools'), + // MissionPool.generateRouterObject('mission-pools'), History.generateRouterObject('history'), - History.generateRouterObject('history/:address/:chain/:extrinsicHashOrId'), - DApps.generateRouterObject('dapps') + History.generateRouterObject('history/:address/:chain/:extrinsicHashOrId') + // DApps.generateRouterObject('dapps') ] }, { @@ -227,7 +226,7 @@ export const router = createBrowserRouter([ CancelUnstake.generateRouterObject('cancel-unstake'), ClaimReward.generateRouterObject('claim-reward'), Withdraw.generateRouterObject('withdraw'), - SwapTransaction.generateRouterObject('swap'), + // SwapTransaction.generateRouterObject('swap'), { path: 'compound', element: @@ -290,17 +289,17 @@ export const router = createBrowserRouter([ path: 'accounts', element: , children: [ - NewSeedPhrase.generateRouterObject('new-seed-phrase'), - ImportSeedPhrase.generateRouterObject('import-seed-phrase'), - ImportPrivateKey.generateRouterObject('import-private-key'), - RestoreJson.generateRouterObject('restore-json'), - ImportQrCode.generateRouterObject('import-by-qr'), + // NewSeedPhrase.generateRouterObject('new-seed-phrase'), + // ImportSeedPhrase.generateRouterObject('import-seed-phrase'), + // ImportPrivateKey.generateRouterObject('import-private-key'), + // RestoreJson.generateRouterObject('restore-json'), + // ImportQrCode.generateRouterObject('import-by-qr'), AttachReadOnly.generateRouterObject('attach-read-only'), ConnectPolkadotVault.generateRouterObject('connect-polkadot-vault'), ConnectKeystone.generateRouterObject('connect-keystone'), ConnectLedger.generateRouterObject('connect-ledger'), - AccountDetail.generateRouterObject('detail/:accountAddress'), - AccountExport.generateRouterObject('export/:accountAddress') + AccountDetail.generateRouterObject('detail/:accountAddress') + // AccountExport.generateRouterObject('export/:accountAddress') ] }, { @@ -312,17 +311,17 @@ export const router = createBrowserRouter([ ConnectionDetail.generateRouterObject('detail/:topic') ] }, - { - ...CrowdloanUnlockCampaign.generateRouterObject('/crowdloan-unlock-campaign'), - children: [ - CheckCrowdloanContributions.generateRouterObject('check-contributions'), - CrowdloanContributionsResult.generateRouterObject('contributions-result') - ] - }, + // { + // ...CrowdloanUnlockCampaign.generateRouterObject('/crowdloan-unlock-campaign'), + // children: [ + // CheckCrowdloanContributions.generateRouterObject('check-contributions'), + // CrowdloanContributionsResult.generateRouterObject('contributions-result') + // ] + // }, NotFoundContent.generateRouterObject('not-found'), NotFoundRedirect.generateRouterObject('*'), - UnsafeAccess.generateRouterObject('unsafe-access'), - PhishingDetected.generateRouterObject(`${PHISHING_PAGE_REDIRECT}/:website`) + UnsafeAccess.generateRouterObject('unsafe-access') + // PhishingDetected.generateRouterObject(`${PHISHING_PAGE_REDIRECT}/:website`) ] } ]); diff --git a/packages/extension-web-ui/src/assets/default-image-placeholder.png b/packages/extension-web-ui/src/assets/default-image-placeholder.png index 06df4100c9..f236219d67 100644 Binary files a/packages/extension-web-ui/src/assets/default-image-placeholder.png and b/packages/extension-web-ui/src/assets/default-image-placeholder.png differ diff --git a/packages/extension-web-ui/src/assets/logo/index.ts b/packages/extension-web-ui/src/assets/logo/index.ts index daa5af569c..63387fb1af 100644 --- a/packages/extension-web-ui/src/assets/logo/index.ts +++ b/packages/extension-web-ui/src/assets/logo/index.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 export const DefaultLogosMap: Record = { - subwallet: '/images/projects/subwallet.png', + subwallet: '/images/avail/avail-icon.png', parity: '/images/projects/parity.png', keystone: '/images/projects/keystone.png', ledger: '/images/projects/ledger.png', diff --git a/packages/extension-web-ui/src/assets/subwallet/availspace.png b/packages/extension-web-ui/src/assets/subwallet/availspace.png new file mode 100644 index 0000000000..81162eca1b Binary files /dev/null and b/packages/extension-web-ui/src/assets/subwallet/availspace.png differ diff --git a/packages/extension-web-ui/src/assets/subwallet/index.ts b/packages/extension-web-ui/src/assets/subwallet/index.ts index c33daad72e..3aee5b76b7 100644 --- a/packages/extension-web-ui/src/assets/subwallet/index.ts +++ b/packages/extension-web-ui/src/assets/subwallet/index.ts @@ -5,7 +5,7 @@ import { DefaultLogosMap } from '@subwallet/extension-web-ui/assets/logo'; const SwLogosMap: Record = { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - subwallet: require('./subwallet.png'), + subwallet: require('./availspace.png'), // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment avatar_placeholder: require('./avatar_placeholder.png'), default: DefaultLogosMap.default, diff --git a/packages/extension-web-ui/src/components/BackgroundExpandView.tsx b/packages/extension-web-ui/src/components/BackgroundExpandView.tsx index f48e96ed75..16b629fe95 100644 --- a/packages/extension-web-ui/src/components/BackgroundExpandView.tsx +++ b/packages/extension-web-ui/src/components/BackgroundExpandView.tsx @@ -3,12 +3,9 @@ import { useIsPopup } from '@subwallet/extension-web-ui/hooks'; import { ThemeProps } from '@subwallet/extension-web-ui/types'; -import { convertHexColorToRGBA, openInNewTab } from '@subwallet/extension-web-ui/utils'; -import { Button, Icon } from '@subwallet/react-ui'; +import { convertHexColorToRGBA } from '@subwallet/extension-web-ui/utils'; import CN from 'classnames'; -import { Question } from 'phosphor-react'; import React, { useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import styled from 'styled-components'; @@ -20,8 +17,6 @@ type Props = ThemeProps; const Component: React.FC = (props: Props) => { const { className } = props; - - const { t } = useTranslation(); const location = useLocation(); const isPopup = useIsPopup(); @@ -50,16 +45,6 @@ const Component: React.FC = (props: Props) => {
-
- -
{ isShowNotification && (
diff --git a/packages/extension-web-ui/src/components/Layout/base/Base.tsx b/packages/extension-web-ui/src/components/Layout/base/Base.tsx index 577d729c2f..7a2fb56094 100644 --- a/packages/extension-web-ui/src/components/Layout/base/Base.tsx +++ b/packages/extension-web-ui/src/components/Layout/base/Base.tsx @@ -11,7 +11,7 @@ import { ThemeProps } from '@subwallet/extension-web-ui/types'; import { SwScreenLayout } from '@subwallet/react-ui'; import { SwTabBarItem } from '@subwallet/react-ui/es/sw-tab-bar'; import CN from 'classnames'; -import { Aperture, Clock, Globe, Parachute, Rocket, Vault, Wallet } from 'phosphor-react'; +import { Aperture, Clock, Vault, Wallet } from 'phosphor-react'; import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation, useNavigate } from 'react-router-dom'; @@ -73,36 +73,36 @@ const Component = ({ children, className, footer, headerIcons, isSetTitleContext key: 'earning', url: '/home/earning' }, - { - icon: { - type: 'phosphor', - phosphorIcon: Globe, - weight: 'fill' - }, - label: t('DApps'), - key: 'dapps', - url: '/home/dapps' - }, - { - icon: { - type: 'phosphor', - phosphorIcon: Parachute, - weight: 'fill' - }, - label: t('Mission Pools'), - key: 'mission-pools', - url: '/home/mission-pools' - }, - { - icon: { - type: 'phosphor', - phosphorIcon: Rocket, - weight: 'fill' - }, - label: t('Crowdloans'), - key: 'crowdloans', - url: '/home/crowdloans' - }, + // { + // icon: { + // type: 'phosphor', + // phosphorIcon: Globe, + // weight: 'fill' + // }, + // label: t('DApps'), + // key: 'dapps', + // url: '/home/dapps' + // }, + // { + // icon: { + // type: 'phosphor', + // phosphorIcon: Parachute, + // weight: 'fill' + // }, + // label: t('Mission Pools'), + // key: 'mission-pools', + // url: '/home/mission-pools' + // }, + // { + // icon: { + // type: 'phosphor', + // phosphorIcon: Rocket, + // weight: 'fill' + // }, + // label: t('Crowdloans'), + // key: 'crowdloans', + // url: '/home/crowdloans' + // }, { icon: { type: 'phosphor', diff --git a/packages/extension-web-ui/src/components/Layout/base/BaseWeb.tsx b/packages/extension-web-ui/src/components/Layout/base/BaseWeb.tsx index 655ea2c018..566e6bb554 100644 --- a/packages/extension-web-ui/src/components/Layout/base/BaseWeb.tsx +++ b/packages/extension-web-ui/src/components/Layout/base/BaseWeb.tsx @@ -28,29 +28,34 @@ const StyledLayout = styled('div')(({ theme: { extendToken, token } zIndex: 10 }, - '.web-layout-background': { - position: 'fixed', - top: 0, - left: 0, - right: 0, - bottom: 0, - zIndex: -1, - transitionDuration: 'background-color 0.3s ease', - background: extendToken.tokensScreenInfoBackgroundColor, - - '&.__background-common': { - background: token.colorBgDefault - }, - '&.__background-info': { - background: extendToken.tokensScreenInfoBackgroundColor - }, - '&.__background-increase': { - background: extendToken.tokensScreenSuccessBackgroundColor - }, - '&.__background-decrease': { - background: extendToken.tokensScreenDangerBackgroundColor - } - }, + // '.web-layout-background': { + // position: 'fixed', + // top: '-10vh', + // left: '0', + // right: '-20vw', + // height: '30vh', + // zIndex: -1, + // transitionDuration: 'background-color 0.3s ease', + // filter: 'blur(110.5px)', + // background: extendToken.tokensScreenInfoBackgroundColor, + // + // '&.__background-common': { + // background: token.colorBgDefault, + // opacity: 0.45 + // }, + // '&.__background-info': { + // opacity: 0.45, + // background: extendToken.tokensScreenInfoBackgroundColor + // }, + // '&.__background-increase': { + // background: extendToken.tokensScreenSuccessBackgroundColor, + // opacity: 0.45 + // }, + // '&.__background-decrease': { + // background: extendToken.tokensScreenDangerBackgroundColor, + // opacity: 0.45 + // } + // }, '.web-layout-container': { display: 'flex', @@ -146,7 +151,7 @@ const StyledLayout = styled('div')(({ theme: { extendToken, token } const BaseWeb = ({ children }: LayoutBaseWebProps) => { const { t } = useTranslation(); const { isWebUI } = useContext(ScreenContext); - const { background, headerType, isPortfolio, + const { headerType, isPortfolio, isSettingPage, onBack, setSidebarCollapsed, showBackButtonOnHeader, showSidebar, sidebarCollapsed, title, webBaseClassName } = useContext(WebUIContext); @@ -168,9 +173,6 @@ const BaseWeb = ({ children }: LayoutBaseWebProps) => { return ( -
{showSidebar &&
{ const dataContext = useContext(DataContext); const { isWebUI } = useContext(ScreenContext); - const { setBackground } = useContext(WebUIContext); const locationPathname = useLocation().pathname; const tokenGroupSlug = useParams()?.slug; const isShowBalance = useSelector((state: RootState) => state.settings.isShowBalance); @@ -71,11 +71,11 @@ function Component ({ className }: Props): React.ReactElement { selectedNetwork, tokenSelectorItems } = useReceiveQR(_tokenGroupSlug); - const currentAccount = useSelector((state) => state.accountState.currentAccount); const { tokens } = useSelector((state) => state.buyService); const [sendFundKey, setSendFundKey] = useState('sendFundKey'); const [buyTokensKey, setBuyTokensKey] = useState('buyTokensKey'); const [buyTokenSymbol, setBuyTokenSymbol] = useState(''); + const { currentAccount, isAllAccount } = useSelector((state) => state.accountState); const notify = useNotification(); const isTotalBalanceDecrease = totalBalanceInfo.change.status === 'decrease'; @@ -164,11 +164,11 @@ function Component ({ className }: Props): React.ReactElement { setBuyTokensKey(`buyTokensKey-${Date.now()}`); }, [locationPathname]); - useEffect(() => { - const backgroundColor = isTotalBalanceDecrease ? BackgroundColorMap.DECREASE : BackgroundColorMap.INCREASE; - - setBackground(backgroundColor); - }, [isTotalBalanceDecrease, setBackground]); + // useEffect(() => { + // const backgroundColor = isTotalBalanceDecrease ? BackgroundColorMap.DECREASE : BackgroundColorMap.INCREASE; + // + // setBackground(backgroundColor); + // }, [isTotalBalanceDecrease, setBackground]); const handleCancelTransfer = useCallback(() => { inactiveModal(TRANSACTION_TRANSFER_MODAL); @@ -197,27 +197,30 @@ function Component ({ className }: Props): React.ReactElement { }); }, []); - const actions: Action[] = [ - { - label: 'Receive', - type: 'receive', - icon: ArrowFatLinesDown, - onClick: onOpenReceive - }, - { - label: 'Send', - type: 'send', - icon: PaperPlaneTilt, - onClick: onOpenSendFund - }, - { - label: 'Buy', - type: 'buys', - icon: ShoppingCartSimple, - onClick: onOpenBuyTokens, - disabled: !isSupportBuyTokens - } - ]; + const actions: Action[] = useMemo(() => + ( + [ + { + label: 'Receive', + type: 'receive', + icon: ArrowFatLinesDown, + onClick: onOpenReceive + }, + { + label: 'Send', + type: 'send', + icon: PaperPlaneTilt, + onClick: onOpenSendFund + }, + { + label: 'Buy', + type: 'buys', + icon: ShoppingCartSimple, + onClick: onOpenBuyTokens, + disabled: !isSupportBuyTokens || !(isAllAccount || isEthereumAddress(currentAccount?.address)) + } + ] + ), [currentAccount?.address, isAllAccount, isSupportBuyTokens, onOpenBuyTokens, onOpenReceive, onOpenSendFund]); return (
@@ -478,7 +481,7 @@ const Balance = styled(Component)(({ theme: { token } }: Props) => ({ '.__block-divider': { height: 116, - width: 1, + width: 2, backgroundColor: token.colorBgDivider, marginTop: token.marginSM }, diff --git a/packages/extension-web-ui/src/components/Layout/parts/Header/Controller.tsx b/packages/extension-web-ui/src/components/Layout/parts/Header/Controller.tsx index cb251235a4..57ff2fbb28 100644 --- a/packages/extension-web-ui/src/components/Layout/parts/Header/Controller.tsx +++ b/packages/extension-web-ui/src/components/Layout/parts/Header/Controller.tsx @@ -10,7 +10,6 @@ import React, { useMemo } from 'react'; import styled from 'styled-components'; import SelectAccount from '../SelectAccount'; -import LockStatus from './parts/LockStatus'; import Networks from './parts/Networks'; export type Props = ThemeProps & { @@ -57,8 +56,6 @@ function Component ({ className, onBack, showBackButton, title = '' }: Props): R
- -
@@ -102,8 +99,12 @@ const Controller = styled(Component)(({ theme: { token } }: Props) => ({ padding: `0 ${token.padding}px`, height: 40, gap: 8, - background: token.colorBgSecondary, - borderRadius: 32 + background: 'rgba(0, 0, 0, 0.25)', + borderRadius: 32, + + '.ant-select-modal-input-container.ant-select-modal-input-bg-default': { + background: 'transparent' + } }, '.trigger-container.-select-account': { diff --git a/packages/extension-web-ui/src/components/Layout/parts/Header/Simple.tsx b/packages/extension-web-ui/src/components/Layout/parts/Header/Simple.tsx index 87edfeb8fb..7e39f4ce80 100644 --- a/packages/extension-web-ui/src/components/Layout/parts/Header/Simple.tsx +++ b/packages/extension-web-ui/src/components/Layout/parts/Header/Simple.tsx @@ -2,12 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 import { Logo2D } from '@subwallet/extension-web-ui/components/Logo'; -import { HELP_URL } from '@subwallet/extension-web-ui/constants'; -import { useDefaultNavigate, useTranslation } from '@subwallet/extension-web-ui/hooks'; +import { useDefaultNavigate } from '@subwallet/extension-web-ui/hooks'; import { ThemeProps } from '@subwallet/extension-web-ui/types'; -import { openInNewTab } from '@subwallet/extension-web-ui/utils'; import { Button, Icon } from '@subwallet/react-ui'; -import { CaretLeft, Question } from 'phosphor-react'; +import { CaretLeft } from 'phosphor-react'; import React, { useCallback } from 'react'; import styled from 'styled-components'; @@ -21,7 +19,6 @@ function Component ({ className, onBack, showBackButton = true, title }: Props): React.ReactElement { - const { t } = useTranslation(); const { goHome } = useDefaultNavigate(); const defaultOnBack = useCallback(() => { @@ -62,21 +59,6 @@ function Component ({ className,
{title}
)} -
); diff --git a/packages/extension-web-ui/src/components/Layout/parts/SelectAccount/Footer.tsx b/packages/extension-web-ui/src/components/Layout/parts/SelectAccount/Footer.tsx index 1a335c6bef..32e3e3cdd6 100644 --- a/packages/extension-web-ui/src/components/Layout/parts/SelectAccount/Footer.tsx +++ b/packages/extension-web-ui/src/components/Layout/parts/SelectAccount/Footer.tsx @@ -1,13 +1,12 @@ // Copyright 2019-2022 @subwallet/extension-web-ui authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ATTACH_ACCOUNT_MODAL, CREATE_ACCOUNT_MODAL, DISCONNECT_EXTENSION_MODAL, IMPORT_ACCOUNT_MODAL, SELECT_ACCOUNT_MODAL, SELECT_EXTENSION_MODAL } from '@subwallet/extension-web-ui/constants'; +import { ATTACH_ACCOUNT_MODAL, DISCONNECT_EXTENSION_MODAL, SELECT_EXTENSION_MODAL } from '@subwallet/extension-web-ui/constants'; import { InjectContext } from '@subwallet/extension-web-ui/contexts/InjectContext'; -import { ScreenContext } from '@subwallet/extension-web-ui/contexts/ScreenContext'; import { useTranslation } from '@subwallet/extension-web-ui/hooks'; import { ThemeProps } from '@subwallet/extension-web-ui/types'; import { Button, Icon, ModalContext } from '@subwallet/react-ui'; -import { FileArrowDown, PlusCircle, PuzzlePiece, Swatches } from 'phosphor-react'; +import { Swatches, Wallet } from 'phosphor-react'; import React, { useCallback, useContext } from 'react'; import styled from 'styled-components'; @@ -15,26 +14,12 @@ type Props = ThemeProps; const Component: React.FC = ({ className }: Props) => { const { t } = useTranslation(); - const { activeModal, inactiveModal } = useContext(ModalContext); + const { activeModal } = useContext(ModalContext); const { enabled, injected, loadingInject } = useContext(InjectContext); - const { isWebUI } = useContext(ScreenContext); - - const openModal = useCallback((id: string) => { - inactiveModal(SELECT_ACCOUNT_MODAL); - activeModal(id); - }, [activeModal, inactiveModal]); - - const openCreateAccount = useCallback(() => { - openModal(CREATE_ACCOUNT_MODAL); - }, [openModal]); - - const openImportAccount = useCallback(() => { - openModal(IMPORT_ACCOUNT_MODAL); - }, [openModal]); const openAttachAccount = useCallback(() => { - openModal(ATTACH_ACCOUNT_MODAL); - }, [openModal]); + activeModal(ATTACH_ACCOUNT_MODAL); + }, [activeModal]); const onClickExtension = useCallback(() => { if (enabled) { @@ -47,32 +32,6 @@ const Component: React.FC = ({ className }: Props) => { return (
-
); }; @@ -103,9 +65,10 @@ const Component: React.FC = ({ className }: Props) => { const SelectAccountFooter = styled(Component)(({ theme: { token } }: Props) => { return { display: 'flex', + justifyContent: 'stretch', - '.btn-min-width': { - minWidth: token.controlHeightLG + token.sizeSM + '.ant-btn': { + width: '100%' } }; }); diff --git a/packages/extension-web-ui/src/components/Layout/parts/SideMenu/MenuItem.tsx b/packages/extension-web-ui/src/components/Layout/parts/SideMenu/MenuItem.tsx index 2cf1eb00e1..5cc66e01c7 100644 --- a/packages/extension-web-ui/src/components/Layout/parts/SideMenu/MenuItem.tsx +++ b/packages/extension-web-ui/src/components/Layout/parts/SideMenu/MenuItem.tsx @@ -2,25 +2,27 @@ // SPDX-License-Identifier: Apache-2.0 import { ThemeProps } from '@subwallet/extension-web-ui/types'; -import { Icon, SwIconProps, Tooltip } from '@subwallet/react-ui'; +import { Icon, SwIconProps, Tag, Tooltip } from '@subwallet/react-ui'; import CN from 'classnames'; import React, { useCallback } from 'react'; import styled from 'styled-components'; +import {useTranslation} from "@subwallet/extension-web-ui/hooks"; export type MenuItemType = { label: string; value: string; icon: SwIconProps['phosphorIcon']; - }; type Props = MenuItemType & ThemeProps & { showToolTip: boolean; isActivated: boolean; onClick: (key: string) => void; + isComingSoon?: boolean; }; -function Component ({ className = '', icon, isActivated, label, onClick, showToolTip, value }: Props): React.ReactElement { +function Component ({ className = '', icon, isActivated, isComingSoon, label, onClick, showToolTip, value }: Props): React.ReactElement { + const { t } = useTranslation(); const _onClick = useCallback(() => { onClick(value); }, [value, onClick]); @@ -40,6 +42,7 @@ function Component ({ className = '', icon, isActivated, label, onClick, showToo />
{label} + {isComingSoon ? {t('SOON')} : ''}
{ @@ -98,6 +101,12 @@ export const MenuItem = styled(Component)(({ theme: { token } }: Props) = 'white-space': 'nowrap' }, + '.ant-tag.ant-tag-secondary': { + marginLeft: 8, + color: '#fff', + backgroundColor: '#384D69' + }, + '&:hover': { backgroundColor: token.colorBgInput }, diff --git a/packages/extension-web-ui/src/components/Layout/parts/SideMenu/SideMenu.tsx b/packages/extension-web-ui/src/components/Layout/parts/SideMenu/SideMenu.tsx index 81696b0018..973f403d6c 100644 --- a/packages/extension-web-ui/src/components/Layout/parts/SideMenu/SideMenu.tsx +++ b/packages/extension-web-ui/src/components/Layout/parts/SideMenu/SideMenu.tsx @@ -2,25 +2,24 @@ // SPDX-License-Identifier: Apache-2.0 import { MenuItem, MenuItemType } from '@subwallet/extension-web-ui/components/Layout/parts/SideMenu/MenuItem'; -import { CONTACT_US, DEFAULT_SWAP_PARAMS, FAQS_URL, SWAP_TRANSACTION, TERMS_OF_SERVICE_URL } from '@subwallet/extension-web-ui/constants'; -import { useSelector, useTranslation } from '@subwallet/extension-web-ui/hooks'; +import { FAQS_URL, SUPPORT_MAIL, TERMS_OF_SERVICE_URL } from '@subwallet/extension-web-ui/constants'; +import { useTranslation } from '@subwallet/extension-web-ui/hooks'; import usePreloadView from '@subwallet/extension-web-ui/hooks/router/usePreloadView'; import { ThemeProps } from '@subwallet/extension-web-ui/types'; -import { isAccountAll, openInNewTab } from '@subwallet/extension-web-ui/utils'; +import { openInNewTab } from '@subwallet/extension-web-ui/utils'; import { Button, Icon, Image } from '@subwallet/react-ui'; import CN from 'classnames'; -import { ArrowCircleLeft, ArrowCircleRight, ArrowsLeftRight, ArrowSquareUpRight, Clock, Gear, Globe, Info, MessengerLogo, Parachute, Rocket, Vault, Wallet } from 'phosphor-react'; +import { ArrowCircleLeft, ArrowCircleRight, ArrowsLeftRight, Clock, Gear, MessengerLogo, NewspaperClipping, Vault, Wallet } from 'phosphor-react'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; -import { useLocalStorage } from 'usehooks-ts'; + +import useNotification from '../../../../hooks/common/useNotification'; export type Props = ThemeProps & { isCollapsed: boolean, setCollapsed: React.Dispatch> }; -const swapPath = '/transaction/swap'; - function Component ({ className, isCollapsed, setCollapsed }: Props): React.ReactElement { @@ -28,21 +27,25 @@ function Component ({ className, const navigate = useNavigate(); const [selectedKeys, setSelectedKeys] = useState([]); const { t } = useTranslation(); - const currentAccount = useSelector((root) => root.accountState.currentAccount); - const [, setSwapStorage] = useLocalStorage(SWAP_TRANSACTION, DEFAULT_SWAP_PARAMS); - const transactionFromValue = useMemo(() => { - return currentAccount?.address ? isAccountAll(currentAccount.address) ? '' : currentAccount.address : ''; - }, [currentAccount?.address]); + const notify = useNotification(); usePreloadView([ 'Home', 'Tokens', 'NftCollections', - 'Crowdloans', - 'Staking', + // 'Crowdloans', + // 'Staking', 'Settings' ]); + const showComingSoon = useCallback(() => { + notify({ + message: t('Coming soon'), + type: 'info', + closable: false + }); + }, [notify, t]); + const menuItems = useMemo(() => { return [ { @@ -55,25 +58,30 @@ function Component ({ className, value: '/home/earning', icon: Vault }, + // { + // label: t('dApps'), + // value: '/home/dapps', + // icon: Globe + // }, + // { + // label: t('Mission Pools'), + // value: '/home/mission-pools', + // icon: Parachute + // }, + // { + // label: t('Crowdloans'), + // value: '/home/crowdloans', + // icon: Rocket + // }, { label: t('Swap'), - value: '/transaction/swap', + value: '/swap', icon: ArrowsLeftRight }, { - label: t('dApps'), - value: '/home/dapps', - icon: Globe - }, - { - label: t('Mission Pools'), - value: '/home/mission-pools', - icon: Parachute - }, - { - label: t('Crowdloans'), - value: '/home/crowdloans', - icon: Rocket + label: t('Bridge'), + value: '/bridge', + icon: NewspaperClipping }, { label: t('History'), @@ -90,21 +98,21 @@ function Component ({ className, const staticMenuItems = useMemo(() => { return [ - { - label: t('FAQs'), - value: 'faqs', - icon: Info - }, + // { + // label: t('FAQs'), + // value: 'faqs', + // icon: Info + // }, { label: t('Contact'), value: 'contact', icon: MessengerLogo - }, - { - label: t('Terms of services'), - value: 'tos', - icon: ArrowSquareUpRight } + // { + // label: t('Terms of services'), + // value: 'tos', + // icon: ArrowSquareUpRight + // } ]; }, [t]); @@ -117,7 +125,7 @@ function Component ({ className, openInNewTab(TERMS_OF_SERVICE_URL)(); break; case 'contact': - openInNewTab(CONTACT_US)(); + window.open(`${SUPPORT_MAIL}?subject=[Avail Space] Contact`, '_self'); break; default: } @@ -126,15 +134,14 @@ function Component ({ className, const handleNavigate = useCallback(( value: string ) => { - if (value === swapPath) { - setSwapStorage({ - ...DEFAULT_SWAP_PARAMS, - from: transactionFromValue - }); + if (value === '/swap' || value === '/bridge') { + showComingSoon(); + + return; } navigate(`${value}`); - }, [navigate, setSwapStorage, transactionFromValue]); + }, [navigate, showComingSoon]); const goHome = useCallback(() => { navigate('/home'); @@ -156,10 +163,6 @@ function Component ({ className, return ['/home/earning/']; } - if (transaction === 'swap') { - return [swapPath]; - } - return ['/home/staking']; } @@ -199,13 +202,27 @@ function Component ({ className, })} >
- {'SubWallet'} +
+ {'SubWallet'} + + {'SubWallet'} +
+ +
diff --git a/packages/extension-web-ui/src/constants/common.ts b/packages/extension-web-ui/src/constants/common.ts index 35557bbfb4..04491a9299 100644 --- a/packages/extension-web-ui/src/constants/common.ts +++ b/packages/extension-web-ui/src/constants/common.ts @@ -11,10 +11,10 @@ export const PRIVACY_AND_POLICY_URL = 'https://docs.subwallet.app/privacy-and-se export const TERMS_OF_SERVICE_URL = 'https://docs.subwallet.app/privacy-and-security/terms-of-service'; export const FAQS_URL = 'https://docs.subwallet.app/main/extension-user-guide/faqs'; export const WEBSITE_URL = 'https://subwallet.app/'; -export const TELEGRAM_URL = 'https://t.me/subwallet'; -export const TWITTER_URL = 'https://twitter.com/subwalletapp'; -export const DISCORD_URL = 'https://discord.com/invite/vPCN4vdB8v'; -export const SUPPORT_MAIL = 'mailto:support@subwallet.app'; +export const TELEGRAM_URL = 'https://t.me/availspaceapp'; +export const TWITTER_URL = 'https://twitter.com/availspaceapp'; +export const DISCORD_URL = 'https://discord.gg/JuBCJKYdjG'; +export const SUPPORT_MAIL = 'mailto:agent@availspace.app'; export const EXTENSION_URL = 'https://subwallet.app/download.html'; export const CONTACT_US = 'https://t.me/subwallet'; export const ALL_KEY = 'all'; diff --git a/packages/extension-web-ui/src/constants/qr.ts b/packages/extension-web-ui/src/constants/qr.ts index 9be5367c95..b302364875 100644 --- a/packages/extension-web-ui/src/constants/qr.ts +++ b/packages/extension-web-ui/src/constants/qr.ts @@ -39,20 +39,3 @@ export const CMD = { SIGN_MSG: 3 } }; - -export const SUPPORT_WALLETS = [{ - name: 'SubWallet', - substrate: 'subwallet-js', - evm: 'SubWallet', - icon: '/images/subwallet.png' -}, { - name: 'Polkadot{.js}', - substrate: 'polkadot-js', - evm: null, - icon: '/images/subwallet.png' -}, { - name: 'Talisman', - substrate: 'talisman', - evm: null, - icon: '/images/subwallet.png' -}]; diff --git a/packages/extension-web-ui/src/contexts/ThemeContext.tsx b/packages/extension-web-ui/src/contexts/ThemeContext.tsx index 59ec971fa1..7d830326e4 100644 --- a/packages/extension-web-ui/src/contexts/ThemeContext.tsx +++ b/packages/extension-web-ui/src/contexts/ThemeContext.tsx @@ -6,17 +6,15 @@ import type { ThemeProps } from '../types'; import { DataContext } from '@subwallet/extension-web-ui/contexts/DataContext'; import applyPreloadStyle from '@subwallet/extension-web-ui/preloadStyle'; import { RootState } from '@subwallet/extension-web-ui/stores'; -import { generateTheme, SW_THEME_CONFIGS, SwThemeConfig } from '@subwallet/extension-web-ui/themes'; +import { appTheme, AppThemeConfig, Theme } from '@subwallet/extension-web-ui/themes'; import { ConfigProvider, theme as reactUiTheme } from '@subwallet/react-ui'; import React, { useContext, useEffect, useMemo, useState } from 'react'; import { useSelector } from 'react-redux'; import styled, { createGlobalStyle, ThemeProvider as StyledComponentThemeProvider } from 'styled-components'; -import { Theme } from '../types'; - interface Props { children: React.ReactNode; - themeConfig: SwThemeConfig + themeConfig: AppThemeConfig } const { useToken } = reactUiTheme; @@ -297,9 +295,8 @@ const GlobalStyle = createGlobalStyle(({ theme }) => { function ThemeGenerator ({ children, themeConfig }: Props): React.ReactElement { const { token } = useToken(); - // Generate theme from config const theme = useMemo(() => { - return generateTheme(themeConfig, token); + return { ...themeConfig, token } as Theme; }, [themeConfig, token]); return ( @@ -325,18 +322,13 @@ const TooltipContainer = styled.div({ export function ThemeProvider ({ children }: ThemeProviderProps): React.ReactElement { const dataContext = useContext(DataContext); - const themeName = useSelector((state: RootState) => state.settings.theme); const logoMaps = useSelector((state: RootState) => state.settings.logoMaps); const [themeReady, setThemeReady] = useState(false); - const themeConfig = useMemo(() => { - const config = SW_THEME_CONFIGS[themeName]; - - Object.assign(config.logoMap.network, logoMaps.chainLogoMap); - Object.assign(config.logoMap.symbol, logoMaps.assetLogoMap); - - return config; - }, [logoMaps, themeName]); + useEffect(() => { + Object.assign(appTheme.logoMap.network, logoMaps.chainLogoMap); + Object.assign(appTheme.logoMap.symbol, logoMaps.assetLogoMap); + }, [logoMaps]); useEffect(() => { dataContext.awaitStores(['settings']).then(() => { @@ -353,9 +345,9 @@ export function ThemeProvider ({ children }: ThemeProviderProps): React.ReactEle - + {children} diff --git a/packages/extension-web-ui/src/contexts/WebUIContext.tsx b/packages/extension-web-ui/src/contexts/WebUIContext.tsx index 0cf092f4da..5ca5ef12a8 100644 --- a/packages/extension-web-ui/src/contexts/WebUIContext.tsx +++ b/packages/extension-web-ui/src/contexts/WebUIContext.tsx @@ -12,6 +12,7 @@ interface WebUIContextProviderProps { } export enum BackgroundColorMap { + WELCOME = 'welcome', COMMON = 'common', INFO = 'info', INCREASE = 'increase', @@ -107,11 +108,11 @@ export const WebUIContextProvider = ({ children }: WebUIContextProviderProps) => if (simplePages.indexOf(pathName) !== -1 || noAccount || checkEarningDonePage(pathname)) { setShowSidebar(false); - setBackground(BackgroundColorMap.INFO); + // setBackground(BackgroundColorMap.INFO); setHeaderType(HeaderType.SIMPLE); } else { setShowSidebar(true); - !isPortfolio && setBackground(BackgroundColorMap.COMMON); + // !isPortfolio && setBackground(BackgroundColorMap.COMMON); if (isPortfolio) { setHeaderType(HeaderType.COMMON); diff --git a/packages/extension-web-ui/src/hooks/account/useDeleteAccount.tsx b/packages/extension-web-ui/src/hooks/account/useDeleteAccount.tsx index 169ba7e80f..b1846e21a1 100644 --- a/packages/extension-web-ui/src/hooks/account/useDeleteAccount.tsx +++ b/packages/extension-web-ui/src/hooks/account/useDeleteAccount.tsx @@ -16,11 +16,11 @@ const useDeleteAccount = () => { const modalProps: SwModalFuncProps = useMemo(() => { return { closable: true, - content: isWebUI ? t('If you ever want to use this account again, you would need to import it again with seedphrase, private key, or JSON file') : t('You will no longer be able to access this account via this extension'), + content: t('If you ever want to use this account again, you would need to attach it again.'), id: modalId, - okText: isWebUI ? t('Delete') : t('Remove'), - subTitle: isWebUI ? t('Delete this account') : t('Remove this account?'), - title: isWebUI ? t('Remove account') : t('Confirmation'), + okText: t('Remove'), + subTitle: t('Remove this account'), + title: t('Remove account'), type: 'error' }; }, [isWebUI, t]); diff --git a/packages/extension-web-ui/src/hooks/chain/useAssetChecker.tsx b/packages/extension-web-ui/src/hooks/chain/useAssetChecker.tsx index 5db9bde3b0..118ff0acec 100644 --- a/packages/extension-web-ui/src/hooks/chain/useAssetChecker.tsx +++ b/packages/extension-web-ui/src/hooks/chain/useAssetChecker.tsx @@ -41,6 +41,10 @@ export default function useAssetChecker () { const chainInfo = chainInfoMap[assetInfo.originChain]; const chainStatus = chainStatusMap[assetInfo.originChain]; + if (!chainInfo) { + return; + } + if ((assetInfo && !assetSetting) || !assetSetting.visible) { const message = t('{{name}} on {{chainName}} is not ready to use, do you want to turn it on?', { replace: { diff --git a/packages/extension-web-ui/src/hooks/wallet-connect/useSelectWalletConnectAccount.ts b/packages/extension-web-ui/src/hooks/wallet-connect/useSelectWalletConnectAccount.ts index ae89384fe8..e289fcbdb4 100644 --- a/packages/extension-web-ui/src/hooks/wallet-connect/useSelectWalletConnectAccount.ts +++ b/packages/extension-web-ui/src/hooks/wallet-connect/useSelectWalletConnectAccount.ts @@ -107,12 +107,11 @@ const useSelectWalletConnectAccount = (params: ProposalTypes.Struct) => { }, [noAllAccount, params.requiredNamespaces]); const isUnSupportCase = useMemo(() => - Object.values(params.requiredNamespaces || {}) + (Object.values(params.requiredNamespaces || {}).length === 0 ? Object.values(params.optionalNamespaces) : Object.values(params.requiredNamespaces)) .map((namespace) => namespace.chains || []) .flat() .some((chain) => !isSupportWalletConnectChain(chain, chainInfoMap)) - , [chainInfoMap, params.requiredNamespaces] - ); + , [chainInfoMap, params.optionalNamespaces, params.requiredNamespaces]); const supportOneChain = useMemo(() => supportedChains.length === 1, [supportedChains]); const supportOneNamespace = useMemo(() => Object.keys(namespaces).length === 1, [namespaces]); diff --git a/packages/extension-web-ui/src/stores/base/AccountState.ts b/packages/extension-web-ui/src/stores/base/AccountState.ts index 8d6d3efb53..dcaaceb37d 100644 --- a/packages/extension-web-ui/src/stores/base/AccountState.ts +++ b/packages/extension-web-ui/src/stores/base/AccountState.ts @@ -38,6 +38,7 @@ const accountStateSlice = createSlice({ return { ...state, ...payload, + hasMasterPassword: true, // Apply for webapp only reduxStatus: ReduxStatus.READY }; }, diff --git a/packages/extension-web-ui/src/stores/base/UIViewState.ts b/packages/extension-web-ui/src/stores/base/UIViewState.ts index 13d22ba03d..f59e589c81 100644 --- a/packages/extension-web-ui/src/stores/base/UIViewState.ts +++ b/packages/extension-web-ui/src/stores/base/UIViewState.ts @@ -19,6 +19,7 @@ const uiViewSlice = createSlice({ return { ...state, ...payload, + isUILocked: false, reduxStatus: ReduxStatus.READY }; } diff --git a/packages/extension-web-ui/src/themes.ts b/packages/extension-web-ui/src/themes.ts index 0758c20836..c6d2644c85 100644 --- a/packages/extension-web-ui/src/themes.ts +++ b/packages/extension-web-ui/src/themes.ts @@ -10,6 +10,7 @@ import { theme as SwReactUI } from '@subwallet/react-ui'; import { ThemeConfig as _ThemeConfig, Web3LogoMap } from '@subwallet/react-ui/es/config-provider/context'; import { AliasToken as _AliasToken, GlobalToken as _GlobalToken } from '@subwallet/react-ui/es/theme/interface'; import logoMap from '@subwallet/react-ui/es/theme/themes/logoMap'; +import seedToken from '@subwallet/react-ui/es/theme/themes/seed'; export type ThemeConfig = _ThemeConfig; export type AliasToken = _AliasToken; @@ -27,38 +28,15 @@ export interface ExtraToken { tokensScreenInfoBackgroundColor: string, } -export type Theme = { +export interface AppThemeConfig extends ThemeConfig { id: ThemeNames; name: string; - token: GlobalToken; - - // todo: add extend token later extendToken: ExtraToken, logoMap: Web3LogoMap, -}; - -export interface SwThemeConfig extends ThemeConfig { - id: ThemeNames, - name: string; - - generateExtraTokens: (token: AliasToken) => ExtraToken; - - customTokens: (token: AliasToken) => AliasToken; - logoMap: Web3LogoMap } -function genDefaultExtraTokens (token: AliasToken): ExtraToken { - return { - oneColumnWidth: 400, - bigOneColumnWidth: 600, - twoColumnWidth: 820, - bodyBackgroundColor: token.colorBgDefault, - logo: subWalletLogo, - defaultImagePlaceholder, - tokensScreenSuccessBackgroundColor: 'linear-gradient(180deg, rgba(76, 234, 172, 0.10) 5%, rgba(217, 217, 217, 0.00) 33%)', - tokensScreenDangerBackgroundColor: 'linear-gradient(180deg, rgba(234, 76, 76, 0.10) 5%, rgba(217, 217, 217, 0.00) 33%)', - tokensScreenInfoBackgroundColor: 'linear-gradient(rgba(0, 75, 255, 0.1) 5%, rgba(217, 217, 217, 0) 33%)' - }; +export type Theme = AppThemeConfig & { + token: GlobalToken; } // todo: will standardized logoMap later @@ -75,45 +53,37 @@ const defaultLogoMap: Web3LogoMap = { default: SwLogosMap.default }; -// Todo: i18n for theme name -// Implement theme from @subwallet/react-ui -export const SW_THEME_CONFIGS: Record = { - [ThemeNames.DARK]: { - id: ThemeNames.DARK, - name: 'Dark', - algorithm: SwReactUI.darkAlgorithm, - customTokens: (token) => (token), - generateExtraTokens: (token) => { - return { ...genDefaultExtraTokens(token) }; - }, - logoMap: defaultLogoMap - }, - [ThemeNames.LIGHT]: { - id: ThemeNames.LIGHT, - name: 'Light', - algorithm: SwReactUI.darkAlgorithm, - customTokens: (token) => (token), - generateExtraTokens: (token) => { - return { ...genDefaultExtraTokens(token) }; - }, - logoMap: defaultLogoMap - }, - [ThemeNames.SUBSPACE]: {} as SwThemeConfig +const currentToken: Partial = { + ...seedToken, + colorPrimary: '#3073F1', + colorSecondary: '#44D5DE', + colorSuccess: '#4CEAAC', + colorWarning: '#f2d457', + colorError: '#E42A12', + colorInfo: '#3073F1', + colorBgBase: '#131518', + colorBgDefault: '#131518', + colorBgSecondary: '#1A1F25', + colorBgDivider: 'rgba(255, 255, 255, 0.1)', + colorBgInput: '#1D2B3E', + bodyFontWeight: '400' }; -// Todo: Replace tokens with Subspace color schema -SW_THEME_CONFIGS[ThemeNames.SUBSPACE] = { ...SW_THEME_CONFIGS[ThemeNames.LIGHT] }; - -export function generateTheme ({ customTokens, - generateExtraTokens, - id, - logoMap, - name }: SwThemeConfig, token: GlobalToken): Theme { - return { - id, - name, - token: customTokens(token), - extendToken: generateExtraTokens(token), - logoMap - } as Theme; -} +export const appTheme: AppThemeConfig = { + id: ThemeNames.DARK, + name: 'Dark', + algorithm: SwReactUI.darkAlgorithm, + token: currentToken, + extendToken: { + oneColumnWidth: 400, + bigOneColumnWidth: 600, + twoColumnWidth: 820, + bodyBackgroundColor: currentToken.colorBgBase || '#000', + logo: subWalletLogo, + defaultImagePlaceholder, + tokensScreenSuccessBackgroundColor: 'linear-gradient(180deg, rgba(76, 234, 172, 0.10) 5%, rgba(217, 217, 217, 0.00) 33%)', + tokensScreenDangerBackgroundColor: 'linear-gradient(180deg, rgba(234, 76, 76, 0.10) 5%, rgba(217, 217, 217, 0.00) 33%)', + tokensScreenInfoBackgroundColor: 'linear-gradient(45deg, #78F7FF 9.56%, #31A0FF 44.2%, #DAC7FF 95.08%)' + }, + logoMap: defaultLogoMap +}; diff --git a/packages/webapp/package.json b/packages/webapp/package.json index 9d66653415..8932732624 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -1,7 +1,7 @@ { "author": "Koni Studio", "bugs": "https://github.com/Koniverse/Subwallet-V2/issues", - "buildNumber": "1164002", + "buildNumber": "1164003", "contributors": [], "description": "A web runner simulate background.js can be use on mobile or environment support web view", "homepage": "https://github.com/Koniverse/Subwallet-V2/tree/master/packages/webapp#readme", diff --git a/packages/webapp/public/assets/reset.css b/packages/webapp/public/assets/reset.css index 83e62a6614..a442b18781 100644 --- a/packages/webapp/public/assets/reset.css +++ b/packages/webapp/public/assets/reset.css @@ -520,7 +520,7 @@ input, button, select, optgroup, textarea { .squircle-border-bg { background-size: 100% 100%; background-repeat: no-repeat; - background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgo8bWFzayBpZD0ibWFzazBfODY0XzczMDgyIiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIzMyIgeT0iMzMiIHdpZHRoPSI1NCIgaGVpZ2h0PSI1NCI+CjxwYXRoIGQ9Ik02MCAzMy4zOTk5QzgwLjE3MDUgMzMuMzk5OSA4Ni42IDM5LjgyOTQgODYuNiA1OS45OTk5Qzg2LjYgODAuMTcwNCA4MC4xNzA1IDg2LjU5OTkgNjAgODYuNTk5OUMzOS44Mjk1IDg2LjU5OTkgMzMuNCA4MC4xNzA0IDMzLjQgNTkuOTk5OUMzMy40IDM5LjgyOTQgMzkuODI5NSAzMy4zOTk5IDYwIDMzLjM5OTlaIiBmaWxsPSIjMDA0QkZGIi8+CjwvbWFzaz4KPHBhdGggZD0iTTYwIDE2LjVDNzYuNjU5OCAxNi41IDg3LjQ3OSAxOS4xNjI1IDk0LjE1ODIgMjUuODQxOEMxMDAuODM3IDMyLjUyMSAxMDMuNSA0My4zNDAyIDEwMy41IDYwQzEwMy41IDc2LjY1OTggMTAwLjgzNyA4Ny40NzkgOTQuMTU4MiA5NC4xNTgyQzg3LjQ3OSAxMDAuODM3IDc2LjY1OTggMTAzLjUgNjAgMTAzLjVDNDMuMzQwMiAxMDMuNSAzMi41MjEgMTAwLjgzNyAyNS44NDE4IDk0LjE1ODJDMTkuMTYyNSA4Ny40NzkgMTYuNSA3Ni42NTk4IDE2LjUgNjBDMTYuNSA0My4zNDAyIDE5LjE2MjUgMzIuNTIxIDI1Ljg0MTggMjUuODQxOEMzMi41MjEgMTkuMTYyNSA0My4zNDAyIDE2LjUgNjAgMTYuNVoiIHN0cm9rZT0iIzIxMjEyMSIvPgo8cGF0aCBkPSJNNjAgMC41QzgyLjcyNjEgMC41IDk3LjU0NTMgNC4xMjkzOCAxMDYuNzA4IDEzLjI5MkMxMTUuODcxIDIyLjQ1NDcgMTE5LjUgMzcuMjczOSAxMTkuNSA2MEMxMTkuNSA4Mi43MjYxIDExNS44NzEgOTcuNTQ1MyAxMDYuNzA4IDEwNi43MDhDOTcuNTQ1MyAxMTUuODcxIDgyLjcyNjEgMTE5LjUgNjAgMTE5LjVDMzcuMjczOSAxMTkuNSAyMi40NTQ3IDExNS44NzEgMTMuMjkyIDEwNi43MDhDNC4xMjkzOCA5Ny41NDUzIDAuNSA4Mi43MjYxIDAuNSA2MEMwLjUgMzcuMjczOSA0LjEyOTM4IDIyLjQ1NDcgMTMuMjkyIDEzLjI5MkMyMi40NTQ3IDQuMTI5MzggMzcuMjczOSAwLjUgNjAgMC41WiIgc3Ryb2tlPSIjMjEyMTIxIi8+Cjwvc3ZnPgo=); + background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgo8bWFzayBpZD0ibWFzazBfODY0XzczMDgyIiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIzMyIgeT0iMzMiIHdpZHRoPSI1NCIgaGVpZ2h0PSI1NCI+CjxwYXRoIGQ9Ik02MCAzMy4zOTk5QzgwLjE3MDUgMzMuMzk5OSA4Ni42IDM5LjgyOTQgODYuNiA1OS45OTk5Qzg2LjYgODAuMTcwNCA4MC4xNzA1IDg2LjU5OTkgNjAgODYuNTk5OUMzOS44Mjk1IDg2LjU5OTkgMzMuNCA4MC4xNzA0IDMzLjQgNTkuOTk5OUMzMy40IDM5LjgyOTQgMzkuODI5NSAzMy4zOTk5IDYwIDMzLjM5OTlaIiBmaWxsPSIjMDA0QkZGIi8+CjwvbWFzaz4KPHBhdGggZD0iTTYwIDE2LjVDNzYuNjU5OCAxNi41IDg3LjQ3OSAxOS4xNjI1IDk0LjE1ODIgMjUuODQxOEMxMDAuODM3IDMyLjUyMSAxMDMuNSA0My4zNDAyIDEwMy41IDYwQzEwMy41IDc2LjY1OTggMTAwLjgzNyA4Ny40NzkgOTQuMTU4MiA5NC4xNTgyQzg3LjQ3OSAxMDAuODM3IDc2LjY1OTggMTAzLjUgNjAgMTAzLjVDNDMuMzQwMiAxMDMuNSAzMi41MjEgMTAwLjgzNyAyNS44NDE4IDk0LjE1ODJDMTkuMTYyNSA4Ny40NzkgMTYuNSA3Ni42NTk4IDE2LjUgNjBDMTYuNSA0My4zNDAyIDE5LjE2MjUgMzIuNTIxIDI1Ljg0MTggMjUuODQxOEMzMi41MjEgMTkuMTYyNSA0My4zNDAyIDE2LjUgNjAgMTYuNVoiIHN0cm9rZT0icmdiYSgyNTUsMjU1LDI1NSwwLjY1KSIvPgo8cGF0aCBkPSJNNjAgMC41QzgyLjcyNjEgMC41IDk3LjU0NTMgNC4xMjkzOCAxMDYuNzA4IDEzLjI5MkMxMTUuODcxIDIyLjQ1NDcgMTE5LjUgMzcuMjczOSAxMTkuNSA2MEMxMTkuNSA4Mi43MjYxIDExNS44NzEgOTcuNTQ1MyAxMDYuNzA4IDEwNi43MDhDOTcuNTQ1MyAxMTUuODcxIDgyLjcyNjEgMTE5LjUgNjAgMTE5LjVDMzcuMjczOSAxMTkuNSAyMi40NTQ3IDExNS44NzEgMTMuMjkyIDEwNi43MDhDNC4xMjkzOCA5Ny41NDUzIDAuNSA4Mi43MjYxIDAuNSA2MEMwLjUgMzcuMjczOSA0LjEyOTM4IDIyLjQ1NDcgMTMuMjkyIDEzLjI5MkMyMi40NTQ3IDQuMTI5MzggMzcuMjczOSAwLjUgNjAgMC41WiIgc3Ryb2tlPSJyZ2JhKDI1NSwyNTUsMjU1LDAuNjUpIi8+Cjwvc3ZnPg==); } .hidden { @@ -591,12 +591,16 @@ div#popup-container { border-top: none !important; border-bottom: none !important; padding: 12px 0; - background: #1a1a1a; + background: #1A1F25; margin: 8px 0; text-align: end; width: 25%; } +.ant-table .ant-table-content table .ant-table-row:hover .ant-table-cell { + background: #1D2B3E !important; +} + .ant-table .ant-table-content table .ant-table-row .ant-table-cell:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; @@ -623,13 +627,13 @@ div#popup-container { .ant-sw-modal .ant-sw-modal-header.ant-sw-modal-header { background-color: transparent; - border-bottom-color: #1a1a1a; + border-bottom-color: #1A1F25; } .ant-sw-modal .ant-sw-modal-content.ant-sw-modal-content { padding-bottom: 0; border-bottom: 0; - background: #0c0c0c; + background: #131518; box-shadow: 4px 4px 4px 0 rgba(0, 0, 0, 0.25); border-radius: 8px; } @@ -676,3 +680,19 @@ div#popup-container { /* slick */ .slick-list,.slick-slider,.slick-track{position:relative;display:block}.slick-loading .slick-slide,.slick-loading .slick-track{visibility:hidden}.slick-slider{box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-khtml-user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{overflow:hidden;margin:0;padding:0}.slick-list:focus{outline:0}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-list,.slick-slider .slick-track{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slick-track{top:0;left:0}.slick-track:after,.slick-track:before{display:table;content:''}.slick-track:after{clear:both}.slick-slide{display:none;float:left;height:100%;min-height:1px}[dir=rtl] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-arrow.slick-hidden{display:none} + +.ant-web3-block { + transition: background-color 0.3s; +} + +.ant-number { + font-family: 'Plus Jakarta Sans'; +} + +.ant-btn-default.-schema-secondary { + background-color: #384D69; +} + +.ant-btn-default.-schema-secondary:hover { + background-color: #4E6786; +} diff --git a/packages/webapp/public/favicon.ico b/packages/webapp/public/favicon.ico index 2b6ca18104..c9b806193d 100644 Binary files a/packages/webapp/public/favicon.ico and b/packages/webapp/public/favicon.ico differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Bold.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Bold.ttf deleted file mode 100644 index a05c5dd4c6..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Bold.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-BoldItalic.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-BoldItalic.ttf deleted file mode 100644 index 4b8535cd2e..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-BoldItalic.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraBold.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraBold.ttf deleted file mode 100644 index 4c7693fa1c..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraBold.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraBoldItalic.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraBoldItalic.ttf deleted file mode 100644 index b0d6fd38a0..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraBoldItalic.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraLight.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraLight.ttf deleted file mode 100644 index b8211303ac..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraLight.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraLightItalic.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraLightItalic.ttf deleted file mode 100644 index a8ee8f619a..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-ExtraLightItalic.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Italic.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Italic.ttf deleted file mode 100644 index 1ff33f6839..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Italic.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Light.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Light.ttf deleted file mode 100644 index 00f6b3bbcb..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Light.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-LightItalic.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-LightItalic.ttf deleted file mode 100644 index ce78c6c4a2..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-LightItalic.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Medium.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Medium.ttf deleted file mode 100644 index 87bdb6fa81..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Medium.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-MediumItalic.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-MediumItalic.ttf deleted file mode 100644 index b389345961..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-MediumItalic.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Regular.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Regular.ttf deleted file mode 100644 index e4a674ca59..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-Regular.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-SemiBold.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-SemiBold.ttf deleted file mode 100644 index 08140df170..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-SemiBold.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-SemiBoldItalic.ttf b/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-SemiBoldItalic.ttf deleted file mode 100644 index 3606ed13af..0000000000 Binary files a/packages/webapp/public/fonts/PlusJakartaSans/PlusJakartaSans-SemiBoldItalic.ttf and /dev/null differ diff --git a/packages/webapp/public/fonts/PlusJakartaSans/index.css b/packages/webapp/public/fonts/PlusJakartaSans/index.css deleted file mode 100644 index 33d6649bbb..0000000000 --- a/packages/webapp/public/fonts/PlusJakartaSans/index.css +++ /dev/null @@ -1,55 +0,0 @@ -@font-face { - font-family: 'Plus Jakarta Sans'; - font-style: normal; - font-weight: 400; - src: url('./PlusJakartaSans-Regular.ttf') format('truetype'); -} - -@font-face { - font-family: 'Plus Jakarta Sans'; - font-style: italic; - font-weight: 400; - src: url('./PlusJakartaSans-Italic.ttf') format('truetype'); -} - -@font-face { - font-family: 'Plus Jakarta Sans'; - font-style: normal; - font-weight: 500; - src: url('./PlusJakartaSans-Medium.ttf') format('truetype'); -} - -@font-face { - font-family: 'Plus Jakarta Sans'; - font-style: italic; - font-weight: 500; - src: url('./PlusJakartaSans-MediumItalic.ttf') format('truetype'); -} - -@font-face { - font-family: 'Plus Jakarta Sans'; - font-style: normal; - font-weight: 600; - src: url('./PlusJakartaSans-SemiBold.ttf') format('truetype'); -} - -@font-face { - font-family: 'Plus Jakarta Sans'; - font-style: italic; - font-weight: 600; - src: url('./PlusJakartaSans-SemiBoldItalic.ttf') format('truetype'); -} - -@font-face { - font-family: 'Plus Jakarta Sans'; - font-style: normal; - font-weight: 700; - src: url('./PlusJakartaSans-Bold.ttf') format('truetype'); -} - -@font-face { - font-family: 'Plus Jakarta Sans'; - font-style: italic; - font-weight: 700; - src: url('./PlusJakartaSans-BoldItalic.ttf') format('truetype'); -} diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-Black.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Black.woff2 new file mode 100644 index 0000000000..77c23a816c Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Black.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-Bold.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Bold.woff2 new file mode 100644 index 0000000000..af3d4423c4 Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Bold.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-ExtraBold.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-ExtraBold.woff2 new file mode 100644 index 0000000000..b43827c537 Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-ExtraBold.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-Light.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Light.woff2 new file mode 100644 index 0000000000..e8b3568d58 Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Light.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-Medium.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Medium.woff2 new file mode 100644 index 0000000000..5476e3e06e Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Medium.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-Regular.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Regular.woff2 new file mode 100644 index 0000000000..eac9d256ed Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Regular.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-SemiBold.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-SemiBold.woff2 new file mode 100644 index 0000000000..b40921a216 Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-SemiBold.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-ThicccAF.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-ThicccAF.woff2 new file mode 100644 index 0000000000..aa95763d59 Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-ThicccAF.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/THICCCBOI-Thin.woff2 b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Thin.woff2 new file mode 100644 index 0000000000..578666932e Binary files /dev/null and b/packages/webapp/public/fonts/thicccboi/THICCCBOI-Thin.woff2 differ diff --git a/packages/webapp/public/fonts/thicccboi/index.css b/packages/webapp/public/fonts/thicccboi/index.css new file mode 100644 index 0000000000..4e4439ef0e --- /dev/null +++ b/packages/webapp/public/fonts/thicccboi/index.css @@ -0,0 +1,27 @@ +@font-face { + font-family: 'THICCCBOI'; + font-style: normal; + font-weight: 400; + src: url('./THICCCBOI-Medium.ttf') format('truetype'); +} + +@font-face { + font-family: 'THICCCBOI'; + font-style: normal; + font-weight: 500; + src: url('./THICCCBOI-Medium.ttf') format('truetype'); +} + +@font-face { + font-family: 'THICCCBOI'; + font-style: normal; + font-weight: 600; + src: url('./THICCCBOI-Medium.ttf') format('truetype'); +} + +@font-face { + font-family: 'THICCCBOI'; + font-style: normal; + font-weight: 700; + src: url('./THICCCBOI-Medium.ttf') format('truetype'); +} diff --git a/packages/webapp/public/images/avail/avail-icon.png b/packages/webapp/public/images/avail/avail-icon.png new file mode 100644 index 0000000000..81162eca1b Binary files /dev/null and b/packages/webapp/public/images/avail/avail-icon.png differ diff --git a/packages/webapp/public/images/avail/avail-light.svg b/packages/webapp/public/images/avail/avail-light.svg new file mode 100644 index 0000000000..f9449629fd --- /dev/null +++ b/packages/webapp/public/images/avail/avail-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/webapp/public/images/avail/avail-space-brand.png b/packages/webapp/public/images/avail/avail-space-brand.png new file mode 100644 index 0000000000..089e31db98 Binary files /dev/null and b/packages/webapp/public/images/avail/avail-space-brand.png differ diff --git a/packages/webapp/public/images/favicon/android-chrome-192x192.png b/packages/webapp/public/images/favicon/android-chrome-192x192.png deleted file mode 100644 index 4df5928b2e..0000000000 Binary files a/packages/webapp/public/images/favicon/android-chrome-192x192.png and /dev/null differ diff --git a/packages/webapp/public/images/favicon/android-chrome-512x512.png b/packages/webapp/public/images/favicon/android-chrome-512x512.png deleted file mode 100644 index de6338c0b0..0000000000 Binary files a/packages/webapp/public/images/favicon/android-chrome-512x512.png and /dev/null differ diff --git a/packages/webapp/public/images/favicon/android-icon-144x144.png b/packages/webapp/public/images/favicon/android-icon-144x144.png new file mode 100644 index 0000000000..4c7c906577 Binary files /dev/null and b/packages/webapp/public/images/favicon/android-icon-144x144.png differ diff --git a/packages/webapp/public/images/favicon/android-icon-192x192.png b/packages/webapp/public/images/favicon/android-icon-192x192.png new file mode 100644 index 0000000000..b304db2a3d Binary files /dev/null and b/packages/webapp/public/images/favicon/android-icon-192x192.png differ diff --git a/packages/webapp/public/images/favicon/android-icon-36x36.png b/packages/webapp/public/images/favicon/android-icon-36x36.png new file mode 100644 index 0000000000..37bd8be0e2 Binary files /dev/null and b/packages/webapp/public/images/favicon/android-icon-36x36.png differ diff --git a/packages/webapp/public/images/favicon/android-icon-48x48.png b/packages/webapp/public/images/favicon/android-icon-48x48.png new file mode 100644 index 0000000000..87b6805091 Binary files /dev/null and b/packages/webapp/public/images/favicon/android-icon-48x48.png differ diff --git a/packages/webapp/public/images/favicon/android-icon-72x72.png b/packages/webapp/public/images/favicon/android-icon-72x72.png new file mode 100644 index 0000000000..536b788a92 Binary files /dev/null and b/packages/webapp/public/images/favicon/android-icon-72x72.png differ diff --git a/packages/webapp/public/images/favicon/android-icon-96x96.png b/packages/webapp/public/images/favicon/android-icon-96x96.png new file mode 100644 index 0000000000..13e8177445 Binary files /dev/null and b/packages/webapp/public/images/favicon/android-icon-96x96.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-114x114.png b/packages/webapp/public/images/favicon/apple-icon-114x114.png new file mode 100644 index 0000000000..4fc2d58cd5 Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-114x114.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-120x120.png b/packages/webapp/public/images/favicon/apple-icon-120x120.png new file mode 100644 index 0000000000..0dc50a2c2f Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-120x120.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-144x144.png b/packages/webapp/public/images/favicon/apple-icon-144x144.png new file mode 100644 index 0000000000..4c7c906577 Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-144x144.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-152x152.png b/packages/webapp/public/images/favicon/apple-icon-152x152.png new file mode 100644 index 0000000000..ad2f71c803 Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-152x152.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-180x180.png b/packages/webapp/public/images/favicon/apple-icon-180x180.png new file mode 100644 index 0000000000..44e5b727a3 Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-180x180.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-57x57.png b/packages/webapp/public/images/favicon/apple-icon-57x57.png new file mode 100644 index 0000000000..720575d08c Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-57x57.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-60x60.png b/packages/webapp/public/images/favicon/apple-icon-60x60.png new file mode 100644 index 0000000000..dd52e8c8e2 Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-60x60.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-72x72.png b/packages/webapp/public/images/favicon/apple-icon-72x72.png new file mode 100644 index 0000000000..536b788a92 Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-72x72.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-76x76.png b/packages/webapp/public/images/favicon/apple-icon-76x76.png new file mode 100644 index 0000000000..f6bd51b7a0 Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-76x76.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon-precomposed.png b/packages/webapp/public/images/favicon/apple-icon-precomposed.png new file mode 100644 index 0000000000..c2976353af Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon-precomposed.png differ diff --git a/packages/webapp/public/images/favicon/apple-icon.png b/packages/webapp/public/images/favicon/apple-icon.png new file mode 100644 index 0000000000..c2976353af Binary files /dev/null and b/packages/webapp/public/images/favicon/apple-icon.png differ diff --git a/packages/webapp/public/images/favicon/browserconfig.xml b/packages/webapp/public/images/favicon/browserconfig.xml new file mode 100644 index 0000000000..c554148223 --- /dev/null +++ b/packages/webapp/public/images/favicon/browserconfig.xml @@ -0,0 +1,2 @@ + +#ffffff \ No newline at end of file diff --git a/packages/webapp/public/images/favicon/favicon-16x16.png b/packages/webapp/public/images/favicon/favicon-16x16.png index e7b2f8b310..c2976353af 100644 Binary files a/packages/webapp/public/images/favicon/favicon-16x16.png and b/packages/webapp/public/images/favicon/favicon-16x16.png differ diff --git a/packages/webapp/public/images/favicon/favicon-32x32.png b/packages/webapp/public/images/favicon/favicon-32x32.png index 432d66fa28..c2976353af 100644 Binary files a/packages/webapp/public/images/favicon/favicon-32x32.png and b/packages/webapp/public/images/favicon/favicon-32x32.png differ diff --git a/packages/webapp/public/images/favicon/favicon-96x96.png b/packages/webapp/public/images/favicon/favicon-96x96.png new file mode 100644 index 0000000000..c2976353af Binary files /dev/null and b/packages/webapp/public/images/favicon/favicon-96x96.png differ diff --git a/packages/webapp/public/images/favicon/favicon.ico b/packages/webapp/public/images/favicon/favicon.ico index 2b6ca18104..9daf912979 100644 Binary files a/packages/webapp/public/images/favicon/favicon.ico and b/packages/webapp/public/images/favicon/favicon.ico differ diff --git a/packages/webapp/public/images/favicon/manifest.json b/packages/webapp/public/images/favicon/manifest.json new file mode 100644 index 0000000000..013d4a6a53 --- /dev/null +++ b/packages/webapp/public/images/favicon/manifest.json @@ -0,0 +1,41 @@ +{ + "name": "App", + "icons": [ + { + "src": "\/android-icon-36x36.png", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "\/android-icon-48x48.png", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "\/android-icon-72x72.png", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "\/android-icon-96x96.png", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "\/android-icon-144x144.png", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "\/android-icon-192x192.png", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + } + ] +} \ No newline at end of file diff --git a/packages/webapp/public/images/favicon/ms-icon-144x144.png b/packages/webapp/public/images/favicon/ms-icon-144x144.png new file mode 100644 index 0000000000..4c7c906577 Binary files /dev/null and b/packages/webapp/public/images/favicon/ms-icon-144x144.png differ diff --git a/packages/webapp/public/images/favicon/ms-icon-150x150.png b/packages/webapp/public/images/favicon/ms-icon-150x150.png new file mode 100644 index 0000000000..e1343d4cf9 Binary files /dev/null and b/packages/webapp/public/images/favicon/ms-icon-150x150.png differ diff --git a/packages/webapp/public/images/favicon/ms-icon-310x310.png b/packages/webapp/public/images/favicon/ms-icon-310x310.png new file mode 100644 index 0000000000..27d1cfb4d8 Binary files /dev/null and b/packages/webapp/public/images/favicon/ms-icon-310x310.png differ diff --git a/packages/webapp/public/images/favicon/ms-icon-70x70.png b/packages/webapp/public/images/favicon/ms-icon-70x70.png new file mode 100644 index 0000000000..a9b1d90a73 Binary files /dev/null and b/packages/webapp/public/images/favicon/ms-icon-70x70.png differ diff --git a/packages/webapp/public/images/icon-128.png b/packages/webapp/public/images/icon-128.png index 054aedd069..81162eca1b 100644 Binary files a/packages/webapp/public/images/icon-128.png and b/packages/webapp/public/images/icon-128.png differ diff --git a/packages/webapp/public/images/icon-16.png b/packages/webapp/public/images/icon-16.png index 054aedd069..81162eca1b 100644 Binary files a/packages/webapp/public/images/icon-16.png and b/packages/webapp/public/images/icon-16.png differ diff --git a/packages/webapp/public/images/icon-32.png b/packages/webapp/public/images/icon-32.png index 054aedd069..81162eca1b 100644 Binary files a/packages/webapp/public/images/icon-32.png and b/packages/webapp/public/images/icon-32.png differ diff --git a/packages/webapp/public/images/icon-48.png b/packages/webapp/public/images/icon-48.png index 054aedd069..81162eca1b 100644 Binary files a/packages/webapp/public/images/icon-48.png and b/packages/webapp/public/images/icon-48.png differ diff --git a/packages/webapp/public/images/icon-64.png b/packages/webapp/public/images/icon-64.png index 054aedd069..81162eca1b 100644 Binary files a/packages/webapp/public/images/icon-64.png and b/packages/webapp/public/images/icon-64.png differ diff --git a/packages/webapp/public/images/webapp-preview-earn.png b/packages/webapp/public/images/webapp-preview-earn.png deleted file mode 100644 index 1f25e7ca34..0000000000 Binary files a/packages/webapp/public/images/webapp-preview-earn.png and /dev/null differ diff --git a/packages/webapp/public/images/webapp-preview-origin.png b/packages/webapp/public/images/webapp-preview-origin.png deleted file mode 100644 index 296f98fea9..0000000000 Binary files a/packages/webapp/public/images/webapp-preview-origin.png and /dev/null differ diff --git a/packages/webapp/public/images/webapp-preview-stake.png b/packages/webapp/public/images/webapp-preview-stake.png deleted file mode 100644 index 1f25e7ca34..0000000000 Binary files a/packages/webapp/public/images/webapp-preview-stake.png and /dev/null differ diff --git a/packages/webapp/public/images/webapp-preview.png b/packages/webapp/public/images/webapp-preview.png index eb6b08289c..c2c2b15fc6 100644 Binary files a/packages/webapp/public/images/webapp-preview.png and b/packages/webapp/public/images/webapp-preview.png differ diff --git a/packages/webapp/public/index.html b/packages/webapp/public/index.html index 2d8fe57356..da7542de38 100644 --- a/packages/webapp/public/index.html +++ b/packages/webapp/public/index.html @@ -3,32 +3,32 @@ - SubWallet - Comprehensive Polkadot, Substrate & Ethereum wallet + Avail Space - Official Aggregated dApp for Avail Ecosystem - + + content="Everything Avail. In one space."> - + content="Avail Space - Official Aggregated dApp for Avail Ecosystem"> + + content="Avail Space - Official Aggregated dApp for Avail Ecosystem"> + content="Everything Avail. In one space."> + content="Avail Space - Official Aggregated dApp for Avail Ecosystem"> - - + content="Everything Avail. In one space."> + + - + - + @@ -36,7 +36,6 @@ -