├── .eslintignore ├── .eslintrc ├── .gitignore ├── .travis.yml ├── .vscode └── settings.json ├── GitFlow.md ├── README.md ├── lerna.json ├── manifest.json ├── package.json ├── packages ├── backgroundScript │ ├── index.js │ ├── package.json │ └── services │ │ ├── NodeService │ │ └── index.js │ │ ├── StorageService │ │ └── index.js │ │ └── WalletService │ │ ├── Account.js │ │ ├── TransactionMapper.js │ │ └── index.js ├── contentScript │ ├── index.js │ └── package.json ├── lib │ ├── EventChannel.js │ ├── MessageDuplex │ │ ├── handlers │ │ │ ├── child.js │ │ │ └── host.js │ │ └── index.js │ ├── api │ │ ├── handlers │ │ │ ├── BackgroundAPI.js │ │ │ └── PopupAPI.js │ │ └── index.js │ ├── constants.js │ ├── debugout.js │ ├── logger.js │ ├── package.json │ ├── transactionBuilder │ │ ├── contracts.json │ │ └── index.js │ └── utils.js ├── pageHook │ ├── SunWeb │ │ ├── SunWeb.js │ │ ├── SunWeb.node.js │ │ └── index.js │ ├── handlers │ │ ├── ProxiedProvider.js │ │ └── RequestHandler.js │ ├── index.js │ └── package.json └── popup │ ├── .env │ ├── README.md │ ├── config-overrides.js │ ├── package.json │ ├── public │ └── index.html │ ├── src │ ├── app │ │ └── index.js │ ├── assets │ │ ├── animations │ │ │ └── checkmark.json │ │ ├── images │ │ │ ├── backgroundPattern.png │ │ │ ├── loader.svg │ │ │ ├── loading.gif │ │ │ ├── loading_black.gif │ │ │ ├── new │ │ │ │ ├── background.svg │ │ │ │ ├── bg.png │ │ │ │ ├── dapp │ │ │ │ │ ├── icon-dapp-hover.svg │ │ │ │ │ ├── icon-dapp.svg │ │ │ │ │ ├── icon-fire.svg │ │ │ │ │ └── 分组 3.svg │ │ │ │ ├── ic_border.svg │ │ │ │ ├── ic_search.svg │ │ │ │ ├── ic_search2.svg │ │ │ │ ├── icon-account-info.svg │ │ │ │ ├── icon-accounts.svg │ │ │ │ ├── icon-accounts2.svg │ │ │ │ ├── icon-add-node.svg │ │ │ │ ├── icon-add.svg │ │ │ │ ├── icon-add2.svg │ │ │ │ ├── icon-arrow-down.svg │ │ │ │ ├── icon-arrow-right.svg │ │ │ │ ├── icon-asset.svg │ │ │ │ ├── icon-auto-lock.png │ │ │ │ ├── icon-auto-lock.svg │ │ │ │ ├── icon-back.svg │ │ │ │ ├── icon-back2.svg │ │ │ │ ├── icon-backup.svg │ │ │ │ ├── icon-bandwidth.svg │ │ │ │ ├── icon-bank-entry.svg │ │ │ │ ├── icon-close.svg │ │ │ │ ├── icon-close2.svg │ │ │ │ ├── icon-copy.svg │ │ │ │ ├── icon-copy2.svg │ │ │ │ ├── icon-copy3.svg │ │ │ │ ├── icon-create-account.png │ │ │ │ ├── icon-create.svg │ │ │ │ ├── icon-currency.svg │ │ │ │ ├── icon-delete.svg │ │ │ │ ├── icon-delete2.svg │ │ │ │ ├── icon-drop-down.svg │ │ │ │ ├── icon-energy.svg │ │ │ │ ├── icon-enter.svg │ │ │ │ ├── icon-enter2.svg │ │ │ │ ├── icon-exchange-hover.svg │ │ │ │ ├── icon-exchange.svg │ │ │ │ ├── icon-file.svg │ │ │ │ ├── icon-frozen.svg │ │ │ │ ├── icon-home-hover.svg │ │ │ │ ├── icon-home.svg │ │ │ │ ├── icon-hot.svg │ │ │ │ ├── icon-import-account.png │ │ │ │ ├── icon-import.svg │ │ │ │ ├── icon-language.svg │ │ │ │ ├── icon-link.svg │ │ │ │ ├── icon-lock.svg │ │ │ │ ├── icon-lock2-hover.svg │ │ │ │ ├── icon-lock2.svg │ │ │ │ ├── icon-more.svg │ │ │ │ ├── icon-more2.svg │ │ │ │ ├── icon-node.svg │ │ │ │ ├── icon-receive.svg │ │ │ │ ├── icon-refresh-hover.svg │ │ │ │ ├── icon-refresh.svg │ │ │ │ ├── icon-selected-account.svg │ │ │ │ ├── icon-selected.svg │ │ │ │ ├── icon-setting-hover.svg │ │ │ │ ├── icon-setting.svg │ │ │ │ ├── icon-share.svg │ │ │ │ ├── icon-success.svg │ │ │ │ ├── icon-telegram-hover.svg │ │ │ │ ├── icon-telegram.svg │ │ │ │ ├── icon-transfer.svg │ │ │ │ ├── icon-twiter-hover.svg │ │ │ │ ├── icon-twiter.svg │ │ │ │ ├── icon-upload.svg │ │ │ │ ├── icon-user.svg │ │ │ │ ├── icon-verify.png │ │ │ │ ├── icon-verify.svg │ │ │ │ ├── icon-vote.svg │ │ │ │ ├── icon-white-list.svg │ │ │ │ ├── icon-whitelist.svg │ │ │ │ ├── language │ │ │ │ │ ├── icon-chinese.png │ │ │ │ │ ├── icon-chinese.svg │ │ │ │ │ ├── icon-english.png │ │ │ │ │ ├── icon-english.svg │ │ │ │ │ ├── icon-japanese.png │ │ │ │ │ └── icon-japanese.svg │ │ │ │ ├── ledger │ │ │ │ │ ├── LOGO.png │ │ │ │ │ ├── icon-create.svg │ │ │ │ │ ├── icon-import.svg │ │ │ │ │ ├── icon-ledger.svg │ │ │ │ │ ├── icon-ledger2-hover.svg │ │ │ │ │ ├── icon-ledger2.svg │ │ │ │ │ ├── icon-ledger3.svg │ │ │ │ │ ├── step1.png │ │ │ │ │ ├── step2.png │ │ │ │ │ ├── step2_2.png │ │ │ │ │ └── step3.png │ │ │ │ ├── logo.svg │ │ │ │ ├── logo2.svg │ │ │ │ ├── market_logo.svg │ │ │ │ ├── popover.svg │ │ │ │ ├── side │ │ │ │ │ ├── Triangle Copy 3.svg │ │ │ │ │ ├── icon-add.svg │ │ │ │ │ ├── icon-delete.png │ │ │ │ │ ├── icon-delete.svg │ │ │ │ │ ├── icon-exchange-hover.svg │ │ │ │ │ ├── icon-exchange.svg │ │ │ │ │ ├── icon-help.svg │ │ │ │ │ ├── icon-seleted.svg │ │ │ │ │ ├── icon-transfer.svg │ │ │ │ │ ├── icon-unseleted.svg │ │ │ │ │ ├── 下拉.svg │ │ │ │ │ └── 路径 7.svg │ │ │ │ ├── token_10_default.png │ │ │ │ ├── tronBank │ │ │ │ │ ├── add.svg │ │ │ │ │ ├── help.svg │ │ │ │ │ ├── hoverArrow.svg │ │ │ │ │ ├── more.svg │ │ │ │ │ ├── question.svg │ │ │ │ │ ├── receive.svg │ │ │ │ │ ├── record.svg │ │ │ │ │ ├── rightArrow.svg │ │ │ │ │ ├── subtrac.svg │ │ │ │ │ └── telegram.svg │ │ │ │ ├── trx.png │ │ │ │ └── usdt │ │ │ │ │ ├── activity.svg │ │ │ │ │ ├── icon-income.svg │ │ │ │ │ ├── icon1.svg │ │ │ │ │ ├── icon2.svg │ │ │ │ │ ├── usdt_income_decorate1.svg │ │ │ │ │ └── usdt_income_decorate2.svg │ │ │ └── spread.svg │ │ └── styles │ │ │ ├── global.scss │ │ │ └── swal.scss │ ├── components │ │ ├── AccountDetails │ │ │ ├── AccountDetails.scss │ │ │ └── index.js │ │ ├── AccountName.js │ │ ├── Alert │ │ │ ├── Alert.scss │ │ │ └── index.js │ │ ├── Button │ │ │ ├── Button.scss │ │ │ └── index.js │ │ ├── Confirmation │ │ │ ├── Confirmation.scss │ │ │ └── index.js │ │ ├── Input │ │ │ ├── Input.scss │ │ │ └── index.js │ │ ├── InputCriteria │ │ │ ├── InputCriteria.scss │ │ │ └── index.js │ │ ├── Loading │ │ │ ├── Loading.scss │ │ │ └── index.js │ │ ├── ProcessBar │ │ │ ├── ProcessBar.scss │ │ │ └── index.js │ │ ├── WalletOption │ │ │ ├── WalletOption.scss │ │ │ └── index.js │ │ └── WarningComponent.js │ ├── controllers │ │ ├── ActivityDetailController.js │ │ ├── AddTokenController.js │ │ ├── AssetManageController.js │ │ ├── BankDetailController │ │ │ ├── BankDetailController.scss │ │ │ └── index.jsx │ │ ├── BankRecordController │ │ │ ├── BankRecodConntroller.scss │ │ │ ├── index.jsx │ │ │ └── subpage │ │ │ │ ├── LoadMore │ │ │ │ └── index.jsx │ │ │ │ └── RecordList │ │ │ │ ├── RecordList.scss │ │ │ │ └── index.jsx │ │ ├── ConfirmationController │ │ │ ├── ConfirmationController.scss │ │ │ └── index.js │ │ ├── CreateAccountController │ │ │ ├── index.js │ │ │ └── stages │ │ │ │ ├── ConfirmingPhrase │ │ │ │ ├── ConfirmingPhrase.scss │ │ │ │ └── index.js │ │ │ │ └── WritingPhrase │ │ │ │ ├── WritingPhrase.scss │ │ │ │ └── index.js │ │ ├── DappListController.js │ │ ├── DappWhitelistController │ │ │ ├── DappWhitelistController.scss │ │ │ └── index.js │ │ ├── IncomeRecordController.js │ │ ├── LedgerController │ │ │ ├── LedgerAccountImportController.js │ │ │ ├── LedgerController.scss │ │ │ └── index.js │ │ ├── LoginController.js │ │ ├── NodeManageController │ │ │ ├── NodeManageController.scss │ │ │ └── index.js │ │ ├── PageController │ │ │ ├── Header │ │ │ │ ├── Header.scss │ │ │ │ └── index.js │ │ │ ├── PageController.scss │ │ │ └── index.js │ │ ├── ReceiveController.js │ │ ├── RegistrationController.js │ │ ├── RestoreAccountController │ │ │ ├── RestoreAccountController.scss │ │ │ ├── index.js │ │ │ └── stages │ │ │ │ ├── ChoosingType │ │ │ │ └── index.js │ │ │ │ ├── KeystoreImport │ │ │ │ ├── KeystoreImport.scss │ │ │ │ └── index.js │ │ │ │ ├── MnemonicImport │ │ │ │ ├── MnemonicImport.scss │ │ │ │ └── index.js │ │ │ │ └── PrivateKeyImport │ │ │ │ ├── PrivateKeyImport.scss │ │ │ │ └── index.js │ │ ├── SendController.js │ │ ├── SettingController.js │ │ ├── TestHtmlController.js │ │ ├── TransactionDetailController.js │ │ ├── TransactionsController │ │ │ └── index.js │ │ ├── TransferController.js │ │ ├── TronBankController │ │ │ ├── TronBankController.scss │ │ │ └── index.jsx │ │ ├── TronBankHelp │ │ │ ├── TronBankHelp.scss │ │ │ └── index.jsx │ │ └── WalletCreationController.js │ ├── fetch │ │ ├── get.js │ │ ├── post.js │ │ └── tronLending │ │ │ └── tronLending.js │ ├── index.js │ ├── pages │ │ ├── AccountsPage │ │ │ ├── AccountsPage.scss │ │ │ └── index.js │ │ ├── SendPage │ │ │ ├── SendPage.scss │ │ │ └── index.js │ │ ├── SettingsPage │ │ │ ├── SettingsPage.scss │ │ │ └── index.js │ │ ├── TokensPage │ │ │ ├── TokensPage.scss │ │ │ └── index.js │ │ └── TransactionsPage │ │ │ ├── Transaction │ │ │ ├── Transaction.scss │ │ │ └── index.js │ │ │ ├── TransactionsPage.scss │ │ │ └── index.js │ ├── reducers │ │ ├── accountsReducer.js │ │ ├── appReducer.js │ │ ├── confirmationsReducer.js │ │ └── index.js │ ├── tokensMap.js │ └── translations │ │ ├── en.json │ │ ├── ja.json │ │ └── zh.json │ ├── static │ ├── icon.png │ └── logo.png │ └── yarn.lock ├── webpack.config.js └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | static 4 | build 5 | webpack.config.js 6 | install.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # production 5 | build 6 | dist 7 | 8 | # misc 9 | .DS_Store 10 | .env.local 11 | .env.development.local 12 | .env.test.local 13 | .env.production.local 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | promo 18 | package-lock.json 19 | lerna-debug.log 20 | 21 | # Extension 22 | /key.pem 23 | /chrome-extension.zip 24 | /.idea 25 | .zip 26 | .vscode 27 | .vscode/ 28 | .tags 29 | .history/* 30 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "12" 4 | before_install: 5 | - npm install 6 | - yarn install 7 | 8 | cache: 9 | yarn: true 10 | 11 | install: 12 | - yarn 13 | 14 | matrix: 15 | include: 16 | - name: build 17 | script: 18 | - CI=false yarn build 19 | 20 | - name: build_core 21 | script: 22 | - yarn build:core 23 | 24 | skip_build: 25 | README.md -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ycy.reminderViewIntervalInMinutes": 1 3 | } -------------------------------------------------------------------------------- /GitFlow.md: -------------------------------------------------------------------------------- 1 | 2 | # 分支说明 3 | 4 | Master分支,这个分支包含最近发布到生成环境的代码,并通过Tag进行标注Release版本号,这个分支只能从其他分支合并,不能在这个分支直接修改。 5 | 6 | Develop分支,这个分支是我们的主开发分支,包含所有要发布到下一个Release的代码,这个分支只能从其他分支合并,不能在这个分支直接修改。 7 | 8 | Feature分支,这个分支主要是用来开发一个新的功能,基于Develop分支创建,一旦开发完成,就会将其合并回Develop分支,并将其删除。 9 | 10 | Release分支,预发布分支,当你需要发布的时候,基于Develop分支创建一个Release分支,允许小修复和最终版本元数据(版本号等)修改,从Develop分支到Release分支的关键点是开发完成反映新版本的期望状态。至少合并了所有针对要发布的功能,针对未来版本的所有功能不会被合并-他们必须等到Release分支创建完成后才可以被合并。完成Release后,将其合并到Master分支(需要打Tag)和Develop分支,并将其删除。上线前最后的测试将在这个分支进行。 11 | 12 | Hotfix分支,当我们在Master分支发现Bug的时候,需要基于Master分支创建一个Hotfix分支,完成Hotfix后,将其合并到Master分支(当做一个新的Release)和Develop分支,并将其删除。 13 | 14 | # 分支命名规范 15 | 16 | Master分支和Develop分支固定为“master”和“develop”; 17 | 18 | Feature分支以“feature/”作为前缀,名称为功能的英文,多个单词用连接符“-”进行连接,例如:feature/my-feature,feature/user-login等; 19 | 20 | Release分支以版本号作为分支名,由项目负责人指定,例如:Odyssey-v3.1.3,3.1.3等; 21 | 22 | Hotfix分支以“hotfix/”作为前缀,名称为Bug简单描述,多个单词用连接符“-”进行连接,例如:hotfix/typo,hotfix/null-point-exception等; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TronLink 2 | 3 | TronLink is firstly launched at TRON’s official website and backed by TRON foundation, TronLink is the TRON wallet with the most users, coming in three versions (Chrome Wallet Extension/iOS/Android), and you're looking at the Chrome Wallet Extension for TRON. 4 | 5 | Main functions: 6 | 7 | Sending and receiving TRX, TRC10 and TRC20 tokens; 8 | Smart contract calls integrated; 9 | 10 | 11 | ## Downloads 12 | **Chrome** – [Download](https://chrome.google.com/webstore/detail/ibnejdfjmmkpcnlpebklmnkoeoihofec)   [![Chrome Web Store](https://img.shields.io/chrome-web-store/d/ogffaloegjglncjfehdfplabnoondfjo.svg?style=flat-square)](https://chrome.google.com/webstore/detail/ibnejdfjmmkpcnlpebklmnkoeoihofec)   [![Chrome Web Store](https://img.shields.io/chrome-web-store/rating/ogffaloegjglncjfehdfplabnoondfjo.svg?style=flat-square)](https://chrome.google.com/webstore/detail/ibnejdfjmmkpcnlpebklmnkoeoihofec) 13 | 14 | 15 | ## Installation 16 | 17 | #### Install yarn 18 | **https://yarnpkg.com/en/docs/install** 19 | 20 | #### Install dependencies 21 | ```sh 22 | $ yarn install 23 | ``` 24 | 25 | ## Building 26 | ```sh 27 | # Build all sources 28 | $ yarn build 29 | ``` 30 | 31 | ```sh 32 | # Build the backend, along with the injected page script 33 | $ yarn build:core 34 | ``` 35 | 36 | ```sh 37 | # Build only the popup component 38 | $ yarn build:popup 39 | ``` 40 | 41 | ## Linting 42 | ```sh 43 | # Run linter over the ./packages folder 44 | $ yarn lint 45 | ``` 46 | 47 | ## Links 48 | + [Website](https://www.tronlink.org/) 49 | + [Support](https://t.me/tronlink) 50 | + [Twitter](https://twitter.com/TronLinkWallet) -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "packages/*" 4 | ], 5 | "version": "2.1.0", 6 | "npmClient": "yarn", 7 | "useWorkspaces": true 8 | } 9 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "TronLink(波宝钱包)", 4 | "version": "3.1.0", 5 | "version_name": "3.1.0", 6 | "description": "The first and most popular TRON wallet. Recommended by TRON Foundation.", 7 | "author": "Kondax ", 8 | "content_security_policy": "script-src 'self' 'unsafe-eval' 'sha256-LayQc1iWBC+6WbHHvHZj3uSx3CxrGBHUJBR7si4qf8w=' 'sha256-POEO+wER89cezFVZ27JoP523HJNPMQxmh5Rcz/OZpr4=' 'sha256-IThiKMnsg0UHaLmP7sJxZpd/ohvINImwjxFJyxGFSlk=' https://*.sentry.io https://www.google-analytics.com https://www.googletagmanager.com https://cdnjs.cloudflare.com; object-src 'self'", 9 | "permissions": [ 10 | "storage", 11 | "unlimitedStorage", 12 | "clipboardWrite", 13 | "activeTab" 14 | ], 15 | "browser_action": { 16 | "default_popup": "packages/popup/build/index.html", 17 | "default_title": "TronLink" 18 | }, 19 | "icons": { 20 | "128": "packages/popup/static/icon.png" 21 | }, 22 | "background": { 23 | "scripts": [ 24 | "dist/backgroundScript.js" 25 | ], 26 | "persistent": true 27 | }, 28 | "content_scripts": [ 29 | { 30 | "matches": [ 31 | "file://*/*", 32 | "http://*/*", 33 | "https://*/*" 34 | ], 35 | "js": [ 36 | "dist/contentScript.js" 37 | ], 38 | "run_at": "document_start", 39 | "all_frames": true 40 | } 41 | ], 42 | "web_accessible_resources": [ 43 | "dist/pageHook.js" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tronlink", 3 | "private": true, 4 | "workspaces": [ 5 | "packages/*" 6 | ], 7 | "scripts": { 8 | "build": "lerna run build", 9 | "build:react": "lerna run build --scope @tronlink/popup", 10 | "build:core": "lerna run build --ignore @tronlink/popup", 11 | "update-version": "lerna publish --skip-git --skip-npm --force-publish '*'", 12 | "lint": "lerna run lint", 13 | "build:zip": "yarn build && npx bestzip chrome-extension.zip dist manifest.json packages/popup/build packages/popup/static" 14 | }, 15 | "devDependencies": { 16 | "@babel/plugin-transform-runtime": "^7.1.0", 17 | "babel-eslint": "^10.0.1", 18 | "babel-plugin-import": "^1.11.0", 19 | "eslint": "^5.9.0", 20 | "eslint-config-airbnb": "^17.1.0", 21 | "eslint-plugin-class-property": "^1.1.0", 22 | "eslint-plugin-import": "^2.14.0", 23 | "eslint-plugin-jsx-a11y": "^6.1.2", 24 | "eslint-plugin-no-null": "^1.0.2", 25 | "eslint-plugin-react": "^7.11.1", 26 | "lerna": "^3.4.3" 27 | }, 28 | "dependencies": { 29 | "@babel/runtime": "^7.1.2", 30 | "yarn": "^1.13.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/backgroundScript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@tronlink/backgroundScript", 3 | "main": "index.js", 4 | "repository": "https://github.com/TronLink/TronLink", 5 | "author": "Kondax ", 6 | "private": true, 7 | "version": "3.1.0", 8 | "dependencies": { 9 | "@sentry/browser": "^4.3.4", 10 | "axios": "^0.18.0", 11 | "bip32": "^1.0.2", 12 | "bip39": "^2.5.0", 13 | "buffer": "^5.2.1", 14 | "eventemitter3": "^3.1.0", 15 | "tronweb": "^2.7.4", 16 | "sunweb": "^1.0.7" 17 | }, 18 | "scripts": { 19 | "build": "webpack --config ../../webpack.config.js --progress --colors -o ../../dist/backgroundScript.js", 20 | "lint": "npx eslint . --fix" 21 | }, 22 | "devDependencies": { 23 | "@babel/core": "^7.1.2", 24 | "@babel/preset-env": "^7.1.0", 25 | "babel-loader": "^8.0.4", 26 | "babel-minify-webpack-plugin": "^0.3.1", 27 | "babel-plugin-transform-runtime": "^6.23.0", 28 | "babel-preset-es2015": "^6.24.1", 29 | "webpack-cli": "^3.1.2" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/contentScript/index.js: -------------------------------------------------------------------------------- 1 | import MessageDuplex from '@tronlink/lib/MessageDuplex'; 2 | import EventChannel from '@tronlink/lib/EventChannel'; 3 | import Logger from '@tronlink/lib/logger'; 4 | import extensionizer from 'extensionizer'; 5 | 6 | const logger = new Logger('contentScript'); 7 | 8 | const contentScript = { 9 | duplex: new MessageDuplex.Tab(), 10 | eventChannel: new EventChannel('contentScript'), 11 | 12 | init() { 13 | logger.info('Initialising TronLink'); 14 | 15 | this.registerListeners(); 16 | this.inject(); 17 | }, 18 | 19 | registerListeners() { 20 | this.eventChannel.on('tunnel', async data => { 21 | try { 22 | this.eventChannel.send( 23 | 'tabReply', 24 | await this.duplex.send('tabRequest', data) 25 | ); 26 | } catch(ex) { 27 | logger.info('Tab request failed:', ex); 28 | } 29 | }); 30 | 31 | this.duplex.on('tunnel', ({ action, data }) => { 32 | this.eventChannel.send(action, data); 33 | }); 34 | }, 35 | 36 | inject() { 37 | const injectionSite = (document.head || document.documentElement); 38 | const container = document.createElement('script'); 39 | 40 | container.src = extensionizer.extension.getURL('dist/pageHook.js'); 41 | container.onload = function() { 42 | this.parentNode.removeChild(this); 43 | }; 44 | 45 | injectionSite.insertBefore( 46 | container, 47 | injectionSite.children[ 0 ] 48 | ); 49 | 50 | logger.info('TronLink injected'); 51 | } 52 | }; 53 | 54 | contentScript.init(); -------------------------------------------------------------------------------- /packages/contentScript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@tronlink/contentScript", 3 | "main": "index.js", 4 | "repository": "https://github.com/TronLink/TronLink", 5 | "author": "Kondax ", 6 | "private": true, 7 | "version": "3.0.0", 8 | "scripts": { 9 | "build": "webpack --config ../../webpack.config.js --progress --colors -o ../../dist/contentScript.js", 10 | "lint": "npx eslint . --fix" 11 | }, 12 | "dependencies": { 13 | "extensionizer": "^1.0.1", 14 | "tronweb": "^2.7.4" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/lib/EventChannel.js: -------------------------------------------------------------------------------- 1 | import EventEmitter from 'eventemitter3'; 2 | 3 | class EventChannel extends EventEmitter { 4 | constructor(channelKey = false) { 5 | super(); 6 | 7 | if(!channelKey) 8 | throw 'No channel scope provided'; 9 | 10 | this._channelKey = channelKey; 11 | this._registerEventListener(); 12 | } 13 | 14 | _registerEventListener() { 15 | window.addEventListener('message', ({ data: { isTronLink = false, message, source } }) => { 16 | if(!isTronLink || (!message && !source)) 17 | return; 18 | 19 | if(source === this._channelKey) 20 | return; 21 | 22 | const { 23 | action, 24 | data 25 | } = message; 26 | 27 | this.emit(action, data); 28 | }); 29 | } 30 | 31 | send(action = false, data = {}) { 32 | if(!action) 33 | return { success: false, error: 'Function requires action {string} parameter' }; 34 | 35 | window.postMessage({ 36 | message: { 37 | action, 38 | data 39 | }, 40 | source: this._channelKey, 41 | isTronLink: true 42 | }, '*'); 43 | } 44 | } 45 | 46 | export default EventChannel; -------------------------------------------------------------------------------- /packages/lib/MessageDuplex/index.js: -------------------------------------------------------------------------------- 1 | import Host from './handlers/host'; 2 | import Child from './handlers/child'; 3 | 4 | const Tab = Child.bind(null, 'tab'); 5 | const Popup = Child.bind(null, 'popup'); 6 | 7 | export default { 8 | Host, 9 | Tab, 10 | Popup 11 | }; -------------------------------------------------------------------------------- /packages/lib/api/index.js: -------------------------------------------------------------------------------- 1 | import popup from './handlers/PopupAPI'; 2 | import background from './handlers/BackgroundAPI'; 3 | 4 | export const PopupAPI = popup; 5 | export const BackgroundAPI = background; -------------------------------------------------------------------------------- /packages/lib/logger.js: -------------------------------------------------------------------------------- 1 | import dateFormat from 'dateformat'; 2 | import debugout from './debugout.js' 3 | export default class Logger { 4 | constructor(source) { 5 | this._source = source; 6 | window.bugout = new debugout(); 7 | return new Proxy(this, { 8 | get(target, name) { 9 | return target._handleInput.bind(target, name); 10 | } 11 | }); 12 | } 13 | 14 | _handleInput(logType, ...data) { 15 | const formatted = this._formatMessage(logType, data); 16 | logType === 'error' && data.length=== 1 && window.bugout.log(data); 17 | logType === 'error' && data.length=== 2 && window.bugout.log([data[0],data[1].stack]); 18 | console.log(...formatted); 19 | } 20 | 21 | _formatMessage(logType = 'info', data) { 22 | let level = logType; 23 | 24 | const colours = { 25 | info: '7f8c8d', 26 | warn: 'f39c12', 27 | error: 'c0392b' 28 | }; 29 | 30 | if(!colours.hasOwnProperty(logType)) 31 | level = 'info'; 32 | 33 | const colour = colours[ level ]; 34 | const timestamp = dateFormat(Date.now(), 'mmm d, hh:MM:ss tt'); 35 | 36 | return [ 37 | `[${ timestamp }] %c[${ this._source }]: %c[${ level.toUpperCase() }]:`, 38 | 'font-weight: bold;', 39 | `color: #${ colour };`, 40 | ...data, 41 | ]; 42 | } 43 | } -------------------------------------------------------------------------------- /packages/lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@tronlink/lib", 3 | "main": "index.js", 4 | "repository": "https://github.com/TronLink/TronLink", 5 | "author": "Kondax ", 6 | "private": true, 7 | "version": "3.0.1", 8 | "dependencies": { 9 | "@tronscan/client": "^0.2.48", 10 | "@ledgerhq/hw-transport-u2f": "^4.31.0", 11 | "aes-js": "^3.1.2", 12 | "bip32": "^1.0.2", 13 | "bip39": "^2.5.0", 14 | "crypto": "^1.0.1", 15 | "dateformat": "^3.0.3", 16 | "eventemitter3": "^3.1.0", 17 | "extensionizer": "^1.0.1", 18 | "pbkdf2": "^3.0.17", 19 | "tronweb": "^2.7.4", 20 | "uuid": "^3.3.2", 21 | "ethers": "^4.0.7" 22 | }, 23 | "scripts": { 24 | "lint": "npx eslint . --fix" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/lib/transactionBuilder/contracts.json: -------------------------------------------------------------------------------- 1 | { 2 | "TransferContract": "wallet/createtransaction", 3 | "VoteWitnessContract": "wallet/votewitnessaccount", 4 | "AccountCreateContract": "wallet/createaccount", 5 | "WitnessCreateContract": "wallet/createwitness", 6 | "TransferAssetContract": "wallet/transferasset", 7 | "ParticipateAssetIssueContract": "wallet/participateassetissue", 8 | "AssetIssueContract": "wallet/createassetissue", 9 | "FreezeBalanceContract": "wallet/freezebalance", 10 | "UnfreezeBalanceContract": "wallet/unfreezebalance", 11 | "WithdrawBalanceContract": "wallet/withdrawbalance", 12 | "UpdateAssetContract": "wallet/updateasset", 13 | "CreateSmartContract": "wallet/deploycontract", 14 | "TriggerSmartContract": "wallet/triggersmartcontract", 15 | "ExchangeCreateContract": "wallet/exchangecreate", 16 | "ExchangeTransactionContract": "wallet/exchangetransaction", 17 | "ExchangeWithdrawContract": "wallet/exchangewithdraw", 18 | "UpdateSettingContract": "wallet/updatesetting", 19 | "ExchangeInjectContract": "wallet/exchangeinject", 20 | "ProposalApproveContact": "wallet/proposalapprove", 21 | "ProposalDeleteContract": "wallet/proposaldelete", 22 | "UnfreezeAssetContract": "wallet/unfreezeasset", 23 | "AccountUpdateContract": "wallet/updateaccount", 24 | "WitnessUpdateContract": "wallet/updatewitness" 25 | } -------------------------------------------------------------------------------- /packages/lib/transactionBuilder/index.js: -------------------------------------------------------------------------------- 1 | import Contracts from './contracts'; 2 | 3 | export default async (tronWeb, contractType = false, parameters = false) => { 4 | if(!Contracts.hasOwnProperty(contractType)) 5 | return { error: `Contract type ${ contractType } not supported` }; 6 | 7 | const endpoint = Contracts[ contractType ]; 8 | 9 | return { 10 | mapped: await tronWeb.fullNode.request(endpoint, parameters, 'post') 11 | }; 12 | }; -------------------------------------------------------------------------------- /packages/pageHook/SunWeb/index.js: -------------------------------------------------------------------------------- 1 | const SunWeb = require('./SunWeb.node'); 2 | export default SunWeb; -------------------------------------------------------------------------------- /packages/pageHook/handlers/ProxiedProvider.js: -------------------------------------------------------------------------------- 1 | import TronWeb from 'tronweb'; 2 | import Logger from '@tronlink/lib/logger'; 3 | import axios from 'axios'; 4 | 5 | const { HttpProvider } = TronWeb.providers; 6 | const logger = new Logger('ProxiedProvider'); 7 | 8 | class ProxiedProvider extends HttpProvider { 9 | constructor() { 10 | super('http://127.0.0.1'); 11 | 12 | logger.info('Provider initialised'); 13 | 14 | this.ready = false; 15 | this.queue = []; 16 | } 17 | 18 | configure(url) { 19 | logger.info('Received new node:', url); 20 | 21 | this.host = url; 22 | this.instance = axios.create({ 23 | baseURL: url, 24 | timeout: 30000 25 | }); 26 | 27 | this.ready = true; 28 | 29 | while(this.queue.length) { 30 | const { 31 | args, 32 | resolve, 33 | reject 34 | } = this.queue.shift(); 35 | 36 | this.request(...args) 37 | .then(resolve) 38 | .catch(reject) 39 | .then(() => ( 40 | logger.info(`Completed the queued request to ${ args[ 0 ] }`) 41 | )); 42 | } 43 | } 44 | 45 | request(endpoint, payload = {}, method = 'get') { 46 | if(!this.ready) { 47 | logger.info(`Request to ${ endpoint } has been queued`); 48 | 49 | return new Promise((resolve, reject) => { 50 | this.queue.push({ 51 | args: [ endpoint, payload, method ], 52 | resolve, 53 | reject 54 | }); 55 | }); 56 | } 57 | 58 | return super.request(endpoint, payload, method).then(res => { 59 | const response = res.transaction || res; 60 | 61 | Object.defineProperty(response, '__payload__', { 62 | writable: false, 63 | enumerable: false, 64 | configurable: false, 65 | value: payload 66 | }); 67 | 68 | return res; 69 | }); 70 | } 71 | } 72 | 73 | export default ProxiedProvider; -------------------------------------------------------------------------------- /packages/pageHook/handlers/RequestHandler.js: -------------------------------------------------------------------------------- 1 | import randomUUID from 'uuid/v4'; 2 | 3 | const RequestHandler = { 4 | init(eventChannel) { 5 | this.eventChannel = eventChannel; 6 | this.calls = {}; 7 | 8 | this.bindListener(); 9 | return this.handler.bind(this); 10 | }, 11 | 12 | bindListener() { 13 | this.eventChannel.on('tabReply', ({ success, data, uuid }) => { 14 | if(success) 15 | this.calls[ uuid ].resolve(data); 16 | else this.calls[ uuid ].reject(data); 17 | 18 | delete this.calls[ uuid ]; 19 | }); 20 | }, 21 | 22 | handler(action, data = {}) { 23 | const uuid = randomUUID(); 24 | 25 | this.eventChannel.send('tunnel', { 26 | action, 27 | data, 28 | uuid 29 | }); 30 | 31 | return new Promise((resolve, reject) => { 32 | this.calls[ uuid ] = { 33 | resolve, 34 | reject 35 | }; 36 | }); 37 | } 38 | }; 39 | 40 | export default RequestHandler; -------------------------------------------------------------------------------- /packages/pageHook/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@tronlink/pageHook", 3 | "main": "index.js", 4 | "repository": "https://github.com/TronLink/TronLink", 5 | "author": "Kondax ", 6 | "private": true, 7 | "version": "3.1.0", 8 | "scripts": { 9 | "build": "webpack --config ../../webpack.config.js --progress --colors -o ../../dist/pageHook.js", 10 | "lint": "npx eslint . --fix" 11 | }, 12 | "dependencies": { 13 | "ethers": "^4.0.33", 14 | "tronweb": "^2.7.4", 15 | "sunweb": "^1.0.7" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/popup/.env: -------------------------------------------------------------------------------- 1 | NODE_PATH=src/ 2 | SKIP_PREFLIGHT_CHECK=true 3 | REACT_APP_VERSION=$npm_package_version -------------------------------------------------------------------------------- /packages/popup/README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 2 | 3 | ## Available Scripts 4 | 5 | In the project directory, you can run: 6 | 7 | ### `npm start` 8 | 9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 11 | 12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console. 14 | 15 | ### `npm test` 16 | 17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 19 | 20 | ### `npm run build` 21 | 22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance. 24 | 25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed! 27 | 28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 29 | 30 | ### `npm run eject` 31 | 32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 33 | 34 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 35 | 36 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 37 | 38 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 39 | 40 | ## Learn More 41 | 42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 43 | 44 | To learn React, check out the [React documentation](https://reactjs.org/). 45 | -------------------------------------------------------------------------------- /packages/popup/config-overrides.js: -------------------------------------------------------------------------------- 1 | const { injectBabelPlugin } = require('react-app-rewired'); 2 | module.exports = function override(config, env) { 3 | config = injectBabelPlugin(['import', { libraryName: 'antd-mobile', style: 'css' }], config); 4 | return config; 5 | }; -------------------------------------------------------------------------------- /packages/popup/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 19 | 20 | 43 | 44 | 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/backgroundPattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/backgroundPattern.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/loader.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 12 | 13 | 14 | 18 | 22 | 23 | 24 | 28 | 32 | 33 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/loading.gif -------------------------------------------------------------------------------- /packages/popup/src/assets/images/loading_black.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/loading_black.gif -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/background.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 3 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/bg.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/dapp/icon-dapp-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DAPP 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/dapp/icon-dapp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | DAPP 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/dapp/icon-fire.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 162火焰、加热 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/dapp/分组 3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 3 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ic_border.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic_border_color_24px 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ic_search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic_search 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ic_search2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic_search 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-account-info.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 8 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-accounts.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 6 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-accounts2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 账户 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | add 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-add2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | add2 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-arrow-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-asset.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-auto-lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/icon-auto-lock.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic/arrow_back_ios 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-back2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic/arrow_back_ios 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-backup.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 8 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-bandwidth.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-close2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-copy2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Combined Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-create-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/icon-create-account.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-create.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Combined Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 6 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-delete2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 删除 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-drop-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-energy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-enter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic/chevron_right 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-enter2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic/chevron_right 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-exchange-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 交易所 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-exchange.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 交易所 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-frozen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-home-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 手机下载 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 手机下载 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-hot.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-import-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/icon-import-account.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-import.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic_play_for_work_24px 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-language.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 语言 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 立即锁定 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-lock2-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 锁定 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-lock2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 锁定 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-more.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 更多 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-more2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 更多 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-receive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-refresh-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 刷新 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-refresh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 刷新 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-selected-account.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Combined Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-selected.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 2 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-share.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-success.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 4 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-telegram-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 纸飞机 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-telegram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 纸飞机 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-transfer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-upload.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 上传 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Fill 1 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-verify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/icon-verify.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-verify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 7 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-vote.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/icon-whitelist.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/language/icon-chinese.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/language/icon-chinese.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/language/icon-english.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/language/icon-english.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/language/icon-japanese.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/language/icon-japanese.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/language/icon-japanese.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 日本 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ledger/LOGO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/ledger/LOGO.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ledger/icon-create.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icon-test 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ledger/icon-import.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | daoru 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ledger/icon-ledger.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | yingjian (1) 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ledger/step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/ledger/step1.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ledger/step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/ledger/step2.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ledger/step2_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/ledger/step2_2.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/ledger/step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/ledger/step3.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 7 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/popover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 20 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/Triangle Copy 3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Triangle Copy 3 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/icon-add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Combined Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/icon-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/side/icon-delete.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/icon-delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 删除 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/icon-exchange-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 交易所 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/icon-exchange.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 交易所 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/icon-seleted.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 4 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/icon-transfer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 路径 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/icon-unseleted.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 4 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/下拉.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Triangle Copy 3 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/side/路径 7.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 路径 7 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/token_10_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/token_10_default.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/tronBank/add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Combined Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/tronBank/help.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ic_help 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/tronBank/hoverArrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/tronBank/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | more 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/tronBank/record.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 记录 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/tronBank/rightArrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/tronBank/subtrac.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rectangle 6 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/tronBank/telegram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Fill 1 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/trx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/assets/images/new/trx.png -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/usdt/icon-income.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 形状 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/popup/src/assets/images/new/usdt/usdt_income_decorate1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 分组 6 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/popup/src/components/AccountDetails/AccountDetails.scss: -------------------------------------------------------------------------------- 1 | .accountInfo { 2 | background: #EAEAEA; 3 | display: flex; 4 | flex-direction: row; 5 | .accountBalance { 6 | flex: 1; 7 | display: flex; 8 | flex-direction: column; 9 | justify-content: center; 10 | .trxBalance { 11 | & > span:first-of-type { 12 | font-size: 16px; 13 | color: #353a4e; 14 | font-weight: 500; 15 | } 16 | 17 | .ticker { 18 | font-size: 16px; 19 | color: #353a4e; 20 | font-weight: 500; 21 | padding-left: 5px; 22 | } 23 | } 24 | 25 | & > span:last-of-type { 26 | display: block; 27 | margin-top: 3px; 28 | font-size: 14px; 29 | } 30 | } 31 | 32 | .accountLabel { 33 | background: #fff; 34 | border-radius: 4px; 35 | display: flex; 36 | flex-direction: column; 37 | align-items: center; 38 | justify-content: center; 39 | padding: 9px 13px; 40 | margin-right: 10px; 41 | 42 | & > span:first-of-type { 43 | font-size: 13px; 44 | font-weight: 500; 45 | display: block; 46 | } 47 | 48 | & > span:last-of-type { 49 | font-size: 12px; 50 | display: block; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /packages/popup/src/components/AccountDetails/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { connect } from 'react-redux'; 4 | 5 | import { 6 | FormattedMessage, 7 | FormattedNumber 8 | } from 'react-intl'; 9 | 10 | import './AccountDetails.scss'; 11 | 12 | const AccountDetails = ({ account, prices }) => { 13 | const { 14 | balance, 15 | energy, 16 | bandwidth 17 | } = account; 18 | 19 | const { 20 | priceList, 21 | selected: currency 22 | } = prices; 23 | 24 | const amount = (balance / 1000000) * priceList[ currency ]; 25 | 26 | return ( 27 |
28 |
29 |
30 | 31 | 32 | TRX 33 | 34 |
35 | 36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 | 44 |
45 |
46 | ); 47 | }; 48 | 49 | export default connect(state => ({ 50 | account: state.accounts.selected, 51 | prices: state.app.prices 52 | }))(AccountDetails); -------------------------------------------------------------------------------- /packages/popup/src/components/Alert/Alert.scss: -------------------------------------------------------------------------------- 1 | .alert{ 2 | background: #fff; 3 | border-radius: 2px; 4 | padding:30px 24px; 5 | display: flex; 6 | flex-direction: column; 7 | align-items: center; 8 | .title{ 9 | height: 28px; 10 | line-height: 28px; 11 | font-size: 20px; 12 | color: #505160; 13 | } 14 | .body{ 15 | margin-top: 20px; 16 | font-size: 14px; 17 | color: #505160; 18 | line-height:20px; 19 | } 20 | .customButton{ 21 | margin-top: 30px; 22 | height: 36px; 23 | width: 90px; 24 | } 25 | &.normal{ 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /packages/popup/src/components/Alert/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by tron on 2019/7/3. 3 | */ 4 | import React from 'react'; 5 | import Button from '@tronlink/popup/src/components/Button'; 6 | 7 | import { injectIntl } from 'react-intl'; 8 | 9 | import './Alert.scss'; 10 | 11 | class Alert extends React.Component { 12 | constructor(props){ 13 | super(props); 14 | } 15 | 16 | componentDidMount(){ 17 | 18 | } 19 | 20 | render() { 21 | const {formatMessage} = this.props.intl; 22 | const { 23 | className = '', 24 | show = true, 25 | title = formatMessage({id: 'CREATION.LEDGER.ALERT.TIP'}), 26 | body = formatMessage({id: 'CREATION.LEDGER.ALERT.BODY'}), 27 | buttonText = 'BUTTON.CONFIRM' 28 | } = this.props; 29 | 30 | return ( 31 | show 32 | ? 33 |
34 |
35 | {title} 36 |
37 |
38 | {body} 39 |
40 |
42 | : 43 | null 44 | ); 45 | } 46 | }; 47 | 48 | export default injectIntl(Alert); -------------------------------------------------------------------------------- /packages/popup/src/components/Button/Button.scss: -------------------------------------------------------------------------------- 1 | .customButton { 2 | display: flex; 3 | height: 40px; 4 | width: 100%; 5 | border-radius: 2px; 6 | justify-content: center; 7 | align-items: center; 8 | transition: all 200ms ease; 9 | border: none; 10 | 11 | span { 12 | color: #FFFFFF; 13 | font-size: 16px; 14 | } 15 | 16 | &.is-invalid { 17 | opacity: 0.4; 18 | } 19 | 20 | &.is-valid { 21 | cursor: pointer; 22 | } 23 | 24 | &.is-loading { 25 | cursor: wait; 26 | } 27 | 28 | .loadingIndicator { 29 | height: 10px; 30 | } 31 | 32 | &.is-valid:not(.is-loading):hover { 33 | box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.18); 34 | } 35 | 36 | &.is-valid:not(.is-loading):focus { 37 | box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.18); 38 | } 39 | 40 | &.primary { 41 | background: #636ACC; 42 | 43 | &.is-valid:not(.is-loading):hover { 44 | //background: #454c67; 45 | } 46 | 47 | &.is-valid:not(.is-loading):focus { 48 | //background: #474d64; 49 | } 50 | } 51 | 52 | &.success { 53 | background: #38ad64; 54 | 55 | &.is-valid:not(.is-loading):hover { 56 | background: #53c87f; 57 | } 58 | 59 | &.is-valid:not(.is-loading):focus { 60 | background: #36ca6d; 61 | } 62 | } 63 | 64 | &.danger { 65 | background: #ca5e5e; 66 | 67 | &.is-valid:not(.is-loading):hover { 68 | background: #dc6e6e; 69 | } 70 | 71 | &.is-valid:not(.is-loading):focus { 72 | background: #e66f6f; 73 | } 74 | } 75 | 76 | &.white { 77 | background: #FFFFFF; 78 | 79 | span { 80 | color: #000000; 81 | } 82 | 83 | &.is-valid:not(.is-loading):hover { 84 | box-shadow: 0 1px 8px 0 #0000000f; 85 | } 86 | 87 | &.is-valid:not(.is-loading):focus { 88 | box-shadow: 0 1px 8px 0 #00000030; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /packages/popup/src/components/Button/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import LoadingIndicator from 'assets/images/loader.svg'; 3 | 4 | import { BUTTON_TYPE } from '@tronlink/lib/constants'; 5 | import { FormattedMessage } from 'react-intl'; 6 | 7 | import './Button.scss'; 8 | 9 | const Button = props => { 10 | const { 11 | type = BUTTON_TYPE.PRIMARY, 12 | isLoading = false, 13 | isValid = true, 14 | onClick = () => {}, 15 | id 16 | } = props; 17 | 18 | const classes = [ 19 | 'customButton', 20 | type 21 | ]; 22 | 23 | if(isValid && !isLoading) 24 | classes.push('is-valid'); 25 | else classes.push('is-invalid'); 26 | 27 | if(isLoading) 28 | classes.push('is-loading'); 29 | 30 | return ( 31 | 37 | ); 38 | }; 39 | 40 | export default Button; -------------------------------------------------------------------------------- /packages/popup/src/components/Confirmation/Confirmation.scss: -------------------------------------------------------------------------------- 1 | .confirmWrap{ 2 | position: fixed; 3 | z-index:99; 4 | left: 0; 5 | top: 0; 6 | width: 100%; 7 | height: 100%; 8 | background: rgba(3,5,26,0.60); 9 | .confirm{ 10 | margin:160px auto 0; 11 | width: 300px; 12 | background: #FFFFFF; 13 | border-radius: 2px; 14 | display: flex; 15 | flex-direction: column; 16 | padding:26px 23px; 17 | .title{ 18 | height: 28px; 19 | line-height: 28px; 20 | text-align: center; 21 | width: 100%; 22 | font-size: 20px; 23 | color: #505160; 24 | } 25 | .body{ 26 | margin:20px 0 26px; 27 | width: 100%; 28 | height: 20px; 29 | line-height: 20px; 30 | font-size: 14px; 31 | color: rgba(80,81,96,.5); 32 | text-align: center; 33 | } 34 | .btn-group{ 35 | display: flex; 36 | flex-direction: row; 37 | justify-content: space-between; 38 | button{ 39 | flex: 1; 40 | height: 36px; 41 | &:first-child{ 42 | background-color: #C2C8D5; 43 | } 44 | &:last-child{ 45 | margin-left: 14px; 46 | background-color: #636ACC;; 47 | } 48 | } 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /packages/popup/src/components/Confirmation/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by tron on 2019/8/29. 3 | */ 4 | import React from 'react'; 5 | import Button from '@tronlink/popup/src/components/Button'; 6 | 7 | import { injectIntl } from 'react-intl'; 8 | 9 | import './Confirmation.scss'; 10 | 11 | class Confirmation extends React.Component { 12 | constructor(props){ 13 | super(props); 14 | } 15 | 16 | componentDidMount(){ 17 | 18 | } 19 | 20 | render() { 21 | const {formatMessage} = this.props.intl; 22 | const { 23 | show = true, 24 | title = formatMessage({id: 'BUTTON.DELETE'}), 25 | body = formatMessage({id: 'CONFIRMATIONS.DELETE_NODE.BODY'}) 26 | } = this.props; 27 | 28 | return ( 29 | show 30 | ? 31 |
32 |
33 |
34 | {title} 35 |
36 |
37 | {body} 38 |
39 |
40 |
43 |
44 |
45 | : 46 | null 47 | ); 48 | } 49 | }; 50 | export default injectIntl(Confirmation); 51 | 52 | -------------------------------------------------------------------------------- /packages/popup/src/components/Input/Input.scss: -------------------------------------------------------------------------------- 1 | .customInput { 2 | height: 40px; 3 | width: 100%; 4 | line-height: 40px; 5 | border-radius: 4px; 6 | background: #FFFFFF; 7 | display: flex; 8 | flex-direction: row; 9 | 10 | .inputIcon, .inputStatus svg { 11 | height: 12px; 12 | width: 40px; 13 | line-height: 40px; 14 | text-align: center; 15 | align-self: center; 16 | } 17 | 18 | input { 19 | height: 40px; 20 | line-height: 40px; 21 | border: none; 22 | flex: 1; 23 | font-size: 14px; 24 | padding: 0 16px; 25 | background: transparent; 26 | 27 | &.has-icon { 28 | padding-left: 0; 29 | } 30 | 31 | &.has-status { 32 | padding-right: 0; 33 | } 34 | 35 | &:hover { 36 | 37 | } 38 | 39 | &:focus { 40 | 41 | } 42 | } 43 | 44 | .inputStatus { 45 | height: 40px; 46 | width: 40px; 47 | display: flex; 48 | 49 | svg.is-invalid { 50 | color: #AD3838; 51 | } 52 | 53 | svg.is-valid { 54 | color: #38AD64; 55 | } 56 | } 57 | } 58 | 59 | .inputGroup { 60 | background: #F7F7F7; 61 | border-radius: 4px; 62 | 63 | .customInput input { 64 | border-bottom-left-radius: 0; 65 | border-bottom-right-radius: 0; 66 | } 67 | 68 | .criteria { 69 | display: flex; 70 | flex-direction: column; 71 | padding: 10px 0; 72 | } 73 | } -------------------------------------------------------------------------------- /packages/popup/src/components/Input/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { injectIntl } from 'react-intl'; 4 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; 5 | import { VALIDATION_STATE } from '@tronlink/lib/constants'; 6 | 7 | import './Input.scss'; 8 | 9 | const renderStatus = status => { 10 | let icon = false; 11 | 12 | if(status === VALIDATION_STATE.VALID) 13 | icon = 'check-circle'; 14 | 15 | if(status === VALIDATION_STATE.INVALID) 16 | icon = 'times-circle'; 17 | 18 | return ( 19 |
20 | { icon ? : '' } 21 |
22 | ); 23 | }; 24 | 25 | const onKeyPress = ({ key }, onEnter) => { 26 | if(key === 'Enter') 27 | onEnter(); 28 | }; 29 | 30 | const Input = props => { 31 | const { 32 | icon = false, 33 | status = false, 34 | isDisabled = false, 35 | type = 'text', 36 | value = '', 37 | className = '', 38 | onChange = () => {}, 39 | onEnter = () => {}, 40 | validator = false, 41 | intl 42 | } = props; 43 | 44 | let { 45 | placeholder = '' 46 | } = props; 47 | 48 | if(placeholder) 49 | placeholder = intl.messages[ placeholder ]; 50 | 51 | const inputClasses = [ ]; 52 | 53 | if(icon) 54 | inputClasses.push('has-icon'); 55 | 56 | if(status) 57 | inputClasses.push('has-status'); 58 | 59 | if(isDisabled) 60 | inputClasses.push('is-disabled'); 61 | 62 | const handleChange = value => { 63 | if(isDisabled) 64 | return; 65 | 66 | if(validator && !validator.test(value)) 67 | return; 68 | 69 | onChange(value); 70 | }; 71 | 72 | return ( 73 |
74 | { icon ? : '' } 75 | handleChange(value) } 81 | onKeyPress={ event => !isDisabled && onKeyPress(event, onEnter) } 82 | readOnly={ isDisabled } 83 | /> 84 | { status ? renderStatus(status) : '' } 85 |
86 | 87 | ); 88 | }; 89 | 90 | export default injectIntl(Input); -------------------------------------------------------------------------------- /packages/popup/src/components/InputCriteria/InputCriteria.scss: -------------------------------------------------------------------------------- 1 | .inputCriteria { 2 | display: flex; 3 | flex-direction: row; 4 | padding: 5px 0; 5 | 6 | .statusIcon { 7 | width: 40px; 8 | height: 10px; 9 | align-self: end; 10 | margin-top: 3px; 11 | } 12 | 13 | span { 14 | flex: 1; 15 | padding-right: 10px; 16 | font-size: 13px; 17 | line-height: 15px; 18 | 19 | strong { 20 | font-weight: 500; 21 | } 22 | } 23 | 24 | &.is-invalid { 25 | color: #AD3838; 26 | } 27 | 28 | &.is-valid { 29 | color: #38AD64; 30 | } 31 | } -------------------------------------------------------------------------------- /packages/popup/src/components/InputCriteria/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; 4 | import { FormattedHTMLMessage } from 'react-intl'; 5 | 6 | import './InputCriteria.scss'; 7 | 8 | const InputCriteria = props => { 9 | const { 10 | isValid = false, 11 | id 12 | } = props; 13 | 14 | return ( 15 |
16 | 20 | 21 |
22 | ); 23 | }; 24 | 25 | export default InputCriteria; -------------------------------------------------------------------------------- /packages/popup/src/components/Loading/Loading.scss: -------------------------------------------------------------------------------- 1 | .loading{ 2 | position: fixed; 3 | width: 100%; 4 | height: 100%; 5 | left: 0; 6 | top: 0; 7 | background: rgba(0,0,0,0.60); 8 | padding:150px 30px; 9 | z-index:999; 10 | .wrap{ 11 | width: 100%; 12 | background-color: #fff; 13 | border-radius:4px; 14 | padding:40px; 15 | display: flex; 16 | flex-direction: column; 17 | align-items: center; 18 | .title{ 19 | font-size: 14px; 20 | color: #505160; 21 | } 22 | img{ 23 | width: 100px; 24 | height: 100px; 25 | } 26 | .customButton{ 27 | height: 36px; 28 | width: 90px; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /packages/popup/src/components/Loading/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by tron on 2019/7/3. 3 | */ 4 | import React from 'react'; 5 | import Button from '@tronlink/popup/src/components/Button'; 6 | import LoadingGif from 'assets/images/loading_black.gif'; 7 | 8 | import { injectIntl } from 'react-intl'; 9 | 10 | import './Loading.scss'; 11 | 12 | class Loading extends React.Component { 13 | constructor(props){ 14 | super(props); 15 | } 16 | 17 | componentDidMount(){ 18 | if(document.getElementById('tronLedgerBridge')){ 19 | document.head.removeChild(document.getElementById('tronLedgerBridge')); 20 | } 21 | const iframe = document.createElement('iframe'); 22 | iframe.id = 'tronLedgerBridge'; 23 | iframe.src = 'https://zacharyle.github.io/tron-ledger-bridge?new='+Math.random(); 24 | document.head.appendChild(iframe); 25 | } 26 | 27 | render() { 28 | const {formatMessage} = this.props.intl; 29 | const { 30 | show = true, 31 | title = formatMessage({id: 'CREATION.LEDGER.LOADING'}) 32 | } = this.props; 33 | 34 | return ( 35 | show 36 | ? 37 |
38 |
39 |
40 | {title} 41 |
42 | 43 |
45 |
46 | : 47 | null 48 | ); 49 | } 50 | }; 51 | 52 | export default injectIntl(Loading); -------------------------------------------------------------------------------- /packages/popup/src/components/ProcessBar/ProcessBar.scss: -------------------------------------------------------------------------------- 1 | .processBar{ 2 | width: 100%; 3 | height: 12px; 4 | padding:1px 1px 1px 0; 5 | border:1px solid rgba(118,171,97,.5); 6 | border-radius:2px; 7 | display: flex; 8 | flex-direction: row; 9 | 10 | .bar{ 11 | height: 8px; 12 | width: 2px; 13 | border-radius: 1px; 14 | margin-left: 1px; 15 | &.grey{ 16 | background-color: #F3F2F0; 17 | } 18 | &.green{ 19 | background-color: #76AB61; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/popup/src/components/ProcessBar/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './ProcessBar.scss'; 3 | 4 | const ProcessBar = props => { 5 | const { 6 | percentage 7 | } = props; 8 | const index = Math.floor(percentage*44); 9 | 10 | return ( 11 |
12 | { 13 | Array.from({length:44},(v,i)=>i).map(v=>(v
:
)) 14 | } 15 | 16 | ); 17 | }; 18 | 19 | export default ProcessBar; 20 | -------------------------------------------------------------------------------- /packages/popup/src/components/WalletOption/WalletOption.scss: -------------------------------------------------------------------------------- 1 | .greyModal .walletOption { 2 | background: #FFFFFF; 3 | border-radius: 4px; 4 | padding: 15px; 5 | transition: all 200ms ease; 6 | cursor: pointer; 7 | position: relative; 8 | &:hover { 9 | box-shadow: 0px 1px 12px 0px rgba(0, 0, 0, 0.1); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/popup/src/components/WalletOption/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { FormattedMessage } from 'react-intl'; 4 | import Button from '../Button'; 5 | 6 | import './WalletOption.scss'; 7 | 8 | const WalletOption = props => { 9 | const { 10 | className = '', 11 | onClick, 12 | name 13 | } = props; 14 | 15 | const titleKey = `${ name }.TITLE`; 16 | const descKey = `${ name }.TIP`; 17 | 18 | return ( 19 |
20 |
21 |
24 | ); 25 | }; 26 | 27 | export default WalletOption; 28 | -------------------------------------------------------------------------------- /packages/popup/src/components/WarningComponent.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { FormattedMessage } from 'react-intl'; 3 | const WarningComponent = props => { 4 | const {id,show} = props; 5 | return ( 6 |
7 | 8 |
9 | ); 10 | 11 | } 12 | export default WarningComponent; 13 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/BankDetailController/BankDetailController.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: lxm 3 | * @Date: 2019-03-22 11:57:31 4 | * @Last Modified by: lxm 5 | * @Last Modified time: 2019-04-09 16:25:13 6 | */ 7 | .navbar{ 8 | width: 100%; 9 | height: 58px; 10 | font-family: PingFang-SC-Bold; 11 | font-size: 18px; 12 | color: #515060; 13 | .am-navbar-title{ 14 | font-family: PingFang-SC-Bold; 15 | font-size: 18px; 16 | color: #515060; 17 | } 18 | .commonBack{ 19 | cursor: pointer; 20 | position: absolute; 21 | left: 0; 22 | top: 0; 23 | width: 40px; 24 | height: 56px; 25 | background-image: url('../../assets/images/new/icon-back.svg'); 26 | background-repeat: no-repeat; 27 | background-position: center center; 28 | } 29 | } 30 | .orderAccount{ 31 | border-bottom: 1px solid #EFEFEF; 32 | padding: 12px 0; 33 | .accountName{ 34 | font-family: PingFangSC-Regular; 35 | font-size: 14px; 36 | color:#888998; 37 | letter-spacing: 0 38 | } 39 | .accountNum{ 40 | font-family: PingFangSC-Regular; 41 | font-size: 14px; 42 | color: #505160; 43 | letter-spacing: 0; 44 | text-align: right; 45 | margin-top: 12px; 46 | } 47 | } 48 | .orderList{ 49 | border-bottom: 1px solid #EFEFEF; 50 | display: flex; 51 | flex-direction: row; 52 | justify-content: space-between; 53 | padding: 12px 0; 54 | .orderIntroduce{ 55 | font-family: PingFangSC-Regular; 56 | font-size: 14px; 57 | color:#888998; 58 | letter-spacing: 0 59 | } 60 | .orderStatus{ 61 | font-family: PingFangSC-Regular; 62 | font-size: 14px; 63 | color: #505160; 64 | letter-spacing: 0; 65 | display: flex; 66 | flex-direction: row; 67 | .name{ 68 | min-width: 110px; 69 | display: inline-block; 70 | text-align: right; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/BankRecordController/BankRecodConntroller.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: lxm 3 | * @Date: 2019-03-21 14:34:43 4 | * @Last Modified by: lxm 5 | * @Last Modified time: 2019-04-12 16:23:11 6 | */ 7 | .navbar{ 8 | width: 100%; 9 | height: 58px; 10 | font-family: PingFang-SC-Bold; 11 | font-size: 18px; 12 | color: #515060; 13 | .am-navbar-title{ 14 | font-family: PingFang-SC-Bold; 15 | font-size: 18px; 16 | color: #333; 17 | } 18 | .commonBack{ 19 | cursor: pointer; 20 | position: absolute; 21 | left: 0; 22 | top: 0; 23 | width: 40px; 24 | height: 56px; 25 | background-image: url('../../assets/images/new/icon-back.svg'); 26 | background-repeat: no-repeat; 27 | background-position: center center; 28 | } 29 | } 30 | 31 | .am-tabs-tab-bar-wrap{ 32 | padding: 0 41px; 33 | } 34 | .am-tabs-default-bar-top .am-tabs-default-bar-tab:after{ 35 | background-color: #fff; 36 | } 37 | html:not([data-scale]) .am-tabs-default-bar-top .am-tabs-default-bar-tab:after{ 38 | background-color: #fff; 39 | } 40 | #m-tabs-0-1{ 41 | padding:0 10px; 42 | } 43 | 44 | .bankRecordContainer{ 45 | overflow: hidden; 46 | .nodata{ 47 | text-align: center; 48 | font-size:14px; 49 | color:#888998; 50 | font-family: PingFangSC-Regular; 51 | height: 100%; 52 | position: relative; 53 | span{ 54 | display: block; 55 | position: absolute; 56 | width: 100%; 57 | left: 0; 58 | top: 40%; 59 | margin-top: -8px; 60 | } 61 | } 62 | } 63 | .rentListContent{ 64 | padding:10px 18px 40px; 65 | height: 540px; 66 | overflow: auto; 67 | &::-webkit-scrollbar {/*滚动条整体样式*/ 68 | width: 4px; /*高宽分别对应横竖滚动条的尺寸*/ 69 | height: 4px; 70 | } 71 | &::-webkit-scrollbar-thumb {/*滚动条里面小方块*/ 72 | border-radius: 4px; 73 | background: #C2C8D5; 74 | } 75 | &::-webkit-scrollbar-track {/*滚动条里面轨道*/ 76 | background: transparent; 77 | } 78 | .noData{ 79 | text-align: center; 80 | font-family: PingFangSC-Regular; 81 | font-size: 12px; 82 | color: #505160; 83 | margin: 10px 0; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/BankRecordController/subpage/LoadMore/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { injectIntl, FormattedMessage } from 'react-intl'; 3 | 4 | class LoadMore extends React.Component { 5 | render() { 6 | return ( 7 |
this.wrapper = wrapper }> 8 | { 9 | this.props.isLoadingMore ? 10 | ... : 11 | 12 | 13 | 14 | } 15 |
16 | ); 17 | } 18 | 19 | loadMoreHandle() { 20 | // 执行传输过来的 21 | this.props.loadMoreFn(); 22 | } 23 | 24 | componentDidMount() { 25 | // 使用滚动时自动加载更多 26 | const loadMoreFn = this.props.loadMoreFn; 27 | const wrapper = this.wrapper; 28 | let timeoutId; 29 | console.log('数据的高-------------------------', wrapper.clientHeight); 30 | console.log('滚动的高------------------------', document.documentElement.scrollTop); 31 | console.log('滚动的高------------------------', document.body.scrollTop); 32 | console.log('屏幕的高------------------------', document.documentElement.clientHeight); 33 | console.log('%O', this.props.rentListContentDom); 34 | const callback = () => { 35 | const top = wrapper.getBoundingClientRect().top; 36 | const windowHeight = window.screen.height; 37 | if (top && top < windowHeight) { 38 | // 证明 wrapper 已经被滚动到暴露在页面可视范围之内了 39 | loadMoreFn(); 40 | } 41 | }; 42 | 43 | this.props.rentListContentDom.addEventListener('scroll', () => { 44 | if (this.props.isLoadingMore) return; 45 | if (timeoutId) clearTimeout(timeoutId); 46 | timeoutId = setTimeout(callback, 50); 47 | }, false); 48 | } 49 | } 50 | 51 | export default injectIntl(LoadMore); -------------------------------------------------------------------------------- /packages/popup/src/controllers/BankRecordController/subpage/RecordList/RecordList.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: lxm 3 | * @Date: 2019-03-21 18:38:20 4 | * @Last Modified by: lxm 5 | * @Last Modified time: 2019-04-12 16:40:47 6 | */ 7 | .recordList{ 8 | cursor: pointer; 9 | padding:10px 0; 10 | border-bottom:1px solid #F7F8FA; 11 | .address{ 12 | display: flex; 13 | font-family: PingFangSC-Regular; 14 | font-size: 14px; 15 | color: #505160; 16 | img{ 17 | display: inline-block; 18 | width: 13px; 19 | height: 14px; 20 | margin-right: 5px; 21 | } 22 | } 23 | .recordCont{ 24 | flex-direction: row; 25 | display: flex; 26 | justify-content: space-between; 27 | .recordLeftInfo{ 28 | font-family: PingFangSC-Regular; 29 | font-size: 12px; 30 | color: #505160; 31 | padding-top:6px; 32 | } 33 | .time{ 34 | font-family: PingFangSC-Regular; 35 | font-size: 12px; 36 | color: #C2C2D5; 37 | } 38 | .cost{ 39 | font-family: PingFang-SC-Medium; 40 | font-size: 14px; 41 | color: #888998; 42 | text-align: right; 43 | margin-bottom: 6px; 44 | } 45 | .recordValStatus{ 46 | display: flex; 47 | flex-direction: row-reverse; 48 | } 49 | .validStatus{ 50 | display: block; 51 | min-width: 50px; 52 | min-height: 20px; 53 | padding:1px 7px; 54 | line-height: 20px; 55 | background: rgba(118,171,97,0.10); 56 | border-radius: 4px; 57 | font-family: PingFang-SC-Medium; 58 | font-size: 12px; 59 | color: #76AB61; 60 | text-align: center; 61 | } 62 | .dealStatus{ 63 | color:#F5A623; 64 | background: rgba(245, 166, 35, 0.10); 65 | } 66 | .doneStatus{ 67 | display: block; 68 | min-width: 50px; 69 | min-height: 20px; 70 | padding:1px 7px; 71 | line-height: 20px; 72 | background: rgba(194,200,213,0.10); 73 | border-radius: 4px; 74 | font-family: PingFang-SC-Medium; 75 | font-size: 12px; 76 | color: #C2C8D5; 77 | text-align: center; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/CreateAccountController/stages/ConfirmingPhrase/ConfirmingPhrase.scss: -------------------------------------------------------------------------------- 1 | .confirmingPhrase { 2 | .wordList { 3 | margin: 14px 0; 4 | background: #F7F8FA; 5 | border-radius: 2px; 6 | padding: 15px; 7 | text-align: center; 8 | font-size: 17px; 9 | line-height: 25px; 10 | user-select: none; 11 | justify-content: flex-start; 12 | height: 170px; 13 | .word { 14 | float: left; 15 | width: 30%; 16 | height: 29px; 17 | background-color: #fff; 18 | padding: 2px 0; 19 | margin: 0 5% 8px 0; 20 | &:nth-child(3n) { 21 | margin-right: 0; 22 | } 23 | &:nth-child(10), &:nth-child(11), &:nth-child(12) { 24 | margin-bottom: 0; 25 | } 26 | } 27 | } 28 | .options { 29 | display: flex; 30 | flex-direction: row; 31 | flex-wrap: wrap; 32 | align-items: baseline; 33 | justify-content: flex-start; 34 | margin-bottom: 14px; 35 | .word { 36 | margin:4px 10px 4px 0; 37 | padding: 4px 6px; 38 | font-size: 14px; 39 | color: #888998; 40 | border-radius: 2px; 41 | transition: all 150ms ease; 42 | border: 1px solid #888998; 43 | cursor: pointer; 44 | &:not(.correct) {} 45 | &:not(.correct):hover,&.correct{ 46 | background: #C2C2D5; 47 | color: #fff; 48 | border-color:#C2C2D5; 49 | } 50 | 51 | &:not(.correct):active { 52 | background: #C2C2D5; 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/CreateAccountController/stages/WritingPhrase/WritingPhrase.scss: -------------------------------------------------------------------------------- 1 | .writingPhrase .wordList { 2 | margin-bottom: 30px; 3 | background: #F7F8FA; 4 | border-radius: 2px; 5 | padding: 15px; 6 | text-align: center; 7 | font-size: 14px; 8 | line-height: 25px; 9 | display: flex; 10 | flex-wrap: wrap; 11 | user-select: all; 12 | justify-content:flex-start; 13 | height: 170px; 14 | .word { 15 | width: 30%; 16 | background-color: #fff; 17 | padding:2px 0; 18 | margin:0 5% 8px 0; 19 | color: #505160; 20 | &:nth-child(3n){ 21 | margin-right:0; 22 | } 23 | &:nth-child(10),&:nth-child(11),&:nth-child(12){ 24 | margin-bottom: 0; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/CreateAccountController/stages/WritingPhrase/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@tronlink/popup/src/components/Button'; 3 | 4 | import { FormattedMessage } from 'react-intl'; 5 | // import { BUTTON_TYPE } from '@tronlink/lib/constants'; 6 | 7 | import './WritingPhrase.scss'; 8 | 9 | const WritingPhrase = props => { 10 | const { 11 | mnemonic, 12 | onSubmit, 13 | onCancel 14 | } = props; 15 | 16 | return ( 17 |
18 |
19 |
20 | 21 |
22 |
23 |
24 | 25 |
26 |
27 | { mnemonic.split(' ').map((word, index) => ( 28 |
29 | { word.trim() } 30 |
31 | )) } 32 |
33 |
34 | {/**/} 40 |
46 |
47 |
48 | ); 49 | }; 50 | 51 | export default WritingPhrase; 52 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/LedgerController/LedgerController.scss: -------------------------------------------------------------------------------- 1 | .insetContainer { 2 | &.ledger { 3 | padding:0; 4 | overflow: auto; 5 | .pageHeader { 6 | height: 56px; 7 | display: flex; 8 | align-items: center; 9 | justify-content: center; 10 | } 11 | .greyModal { 12 | background-color: #fff !important; 13 | flex:1; 14 | display: flex; 15 | flex-direction: column; 16 | padding-bottom: 40px !important; 17 | .top { 18 | display: flex; 19 | flex-direction: column; 20 | align-items: center; 21 | .icon { 22 | width: 82px; 23 | height: 98px; 24 | background-image: url('../../assets/images/new/ledger/LOGO.png'); 25 | background-position: center; 26 | background-repeat: no-repeat; 27 | background-size:auto 100%; 28 | margin-bottom: 32px; 29 | } 30 | .customButton{ 31 | height: 46px; 32 | } 33 | } 34 | .row{ 35 | margin-top: 20px; 36 | display: flex; 37 | flex-direction: column; 38 | align-items: center; 39 | .line{ 40 | position: relative; 41 | width: 100%; 42 | height: 29px; 43 | color: #fff; 44 | font-size: 16px; 45 | display: flex; 46 | justify-content:center; 47 | &:before{ 48 | content: ''; 49 | width: 100%; 50 | height: 0; 51 | border-top:1px dashed #D0D0D0; 52 | position: absolute; 53 | left: 0; 54 | top: 15px; 55 | } 56 | &:after{ 57 | margin-left:-14px; 58 | left: 50%; 59 | top: 0; 60 | position: absolute; 61 | background-color: #B1B4E5; 62 | border-radius:100%; 63 | width: 29px; 64 | height: 29px; 65 | text-align: center; 66 | line-height: 29px; 67 | content:attr(index); 68 | } 69 | } 70 | .desc{ 71 | margin-top: 20px; 72 | font-size: 14px; 73 | color: #898989; 74 | text-align: center; 75 | } 76 | img{ 77 | height: 54px; 78 | margin-top:14px; 79 | } 80 | } 81 | .more{ 82 | color: #636acc; 83 | margin-top: 20px; 84 | font-size: 16px; 85 | text-align:center; 86 | &:hover{ 87 | color: #636acc; 88 | } 89 | } 90 | } 91 | } 92 | } -------------------------------------------------------------------------------- /packages/popup/src/controllers/PageController/Header/Header.scss: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/RestoreAccountController/RestoreAccountController.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/src/controllers/RestoreAccountController/RestoreAccountController.scss -------------------------------------------------------------------------------- /packages/popup/src/controllers/RestoreAccountController/stages/ChoosingType/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { FormattedMessage } from 'react-intl'; 4 | 5 | import { 6 | RESTORATION_STAGE 7 | } from '@tronlink/lib/constants'; 8 | 9 | const ChoosingType = props => { 10 | const { 11 | onSubmit, 12 | onCancel 13 | } = props; 14 | 15 | return ( 16 |
17 |
18 |
19 | 20 |
21 |
22 |
onSubmit(RESTORATION_STAGE.IMPORT_MNEMONIC) }> 23 | 24 |
25 |
onSubmit(RESTORATION_STAGE.IMPORT_PRIVATE_KEY) }> 26 | 27 |
28 |
onSubmit(RESTORATION_STAGE.IMPORT_KEY_STORE) }> 29 | 30 |
31 |
32 |
33 | ); 34 | }; 35 | 36 | export default ChoosingType; 37 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/RestoreAccountController/stages/MnemonicImport/MnemonicImport.scss: -------------------------------------------------------------------------------- 1 | .mnemonicImport { 2 | .phraseInput { 3 | background: #F7F8FA; 4 | padding: 14px; 5 | font-size: 15px; 6 | line-height: 20px; 7 | border-radius: 2px; 8 | user-select: all; 9 | word-break: break-word; 10 | border: none; 11 | width: 100%; 12 | box-sizing: border-box; 13 | resize: none; 14 | } 15 | 16 | .addressList { 17 | margin-bottom: 20px; 18 | .addressOption { 19 | height: 78px; 20 | padding:14px; 21 | background: #F8F9FB; 22 | transition: all 200ms ease; 23 | display: flex; 24 | flex-direction: row; 25 | align-items: center; 26 | margin-bottom: 6px; 27 | &.disabled{ 28 | cursor: not-allowed !important; 29 | opacity:0.8; 30 | pointer-events:none; 31 | } 32 | .checkbox { 33 | height: 16px; 34 | width: 16px; 35 | border-radius:100%; 36 | border:1px solid #C2C8D5; 37 | box-sizing: content-box; 38 | &.isSelected { 39 | background-image: url('../../../../assets/images/new/icon-selected.svg'); 40 | border-color:#636acc; 41 | } 42 | } 43 | .address { 44 | margin-left: 10px; 45 | flex: 1; 46 | display: flex; 47 | flex-direction: column; 48 | & > span{ 49 | flex: 1; 50 | margin:4px 0; 51 | &:first-child{ 52 | font-size: 16px; 53 | color: #515060; 54 | font-weight: bold; 55 | } 56 | &:last-child{ 57 | font-size: 14px; 58 | color: #888998; 59 | } 60 | } 61 | } 62 | 63 | 64 | &:not(.isLoading) { 65 | cursor: pointer; 66 | } 67 | 68 | &:not(.isLoading):hover { 69 | color: #2196f3; 70 | } 71 | 72 | &:last-of-type { 73 | margin-bottom: 0; 74 | } 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/RestoreAccountController/stages/PrivateKeyImport/PrivateKeyImport.scss: -------------------------------------------------------------------------------- 1 | .privateKeyImport { 2 | 3 | .privateKeyInput { 4 | background: #F7F8FA; 5 | padding: 14px; 6 | font-size: 15px; 7 | line-height: 20px; 8 | border-radius: 2px; 9 | user-select: all; 10 | word-break: break-word; 11 | border: none; 12 | width: 100%; 13 | box-sizing: border-box; 14 | resize: none; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/popup/src/controllers/TestHtmlController.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { injectIntl } from 'react-intl'; 3 | 4 | class TestHtmlController extends React.Component { 5 | constructor(props) { 6 | super(props); 7 | this.state = { 8 | app: '1232' 9 | }; 10 | } 11 | 12 | render() { 13 | return( 14 |
15 | 测试页面流程 16 |
17 | ); 18 | } 19 | } 20 | export default injectIntl(TestHtmlController); -------------------------------------------------------------------------------- /packages/popup/src/controllers/WalletCreationController.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import WalletOption from '@tronlink/popup/src/components/WalletOption'; 3 | 4 | // import { FormattedMessage } from 'react-intl'; 5 | import { APP_STATE } from '@tronlink/lib/constants'; 6 | import { PopupAPI } from '@tronlink/lib/api'; 7 | 8 | const onCreationSelect = () => PopupAPI.changeState(APP_STATE.CREATING); 9 | const onRestoreSelect = () => PopupAPI.changeState(APP_STATE.RESTORING); 10 | const onLedgerSelect = () => PopupAPI.changeState(APP_STATE.LEDGER); 11 | 12 | 13 | const WalletCreationController = () => ( 14 |
15 |
16 |
 
17 |
 
18 |
19 |
20 |
21 | 22 | 23 | 24 |
25 |
26 |
27 | ); 28 | 29 | export default WalletCreationController; 30 | -------------------------------------------------------------------------------- /packages/popup/src/fetch/get.js: -------------------------------------------------------------------------------- 1 | // import 'whatwg-fetch'; 2 | // import 'es6-promise'; 3 | 4 | // export const get = (url) => { 5 | // const result = fetch(url, { 6 | // credentials: 'include', 7 | // headers: { 8 | // Accept: 'application/json, text/plain, */*' 9 | // } 10 | // }); 11 | // return result; 12 | // }; 13 | -------------------------------------------------------------------------------- /packages/popup/src/fetch/post.js: -------------------------------------------------------------------------------- 1 | // import 'whatwg-fetch'; 2 | // import 'es6-promise'; 3 | 4 | // // 将对象拼接成 key1=val1&key2=val2&key3=val3 的字符串形式 5 | // function obj2params(obj) { 6 | // var result = ''; 7 | // var item; 8 | // for (item in obj) { 9 | // result += '&' + item + '=' + encodeURIComponent(obj[item]); 10 | // } 11 | 12 | // if (result) { 13 | // result = result.slice(1); 14 | // } 15 | 16 | // return result; 17 | // } 18 | 19 | // // 发送 post 请求 20 | // export function post(url, paramsObj) { 21 | // var result = fetch(url, { 22 | // method: 'POST', 23 | // credentials: 'include', 24 | // headers: { 25 | // 'Accept': 'application/json, text/plain, */*', 26 | // 'Content-Type': 'application/x-www-form-urlencoded' 27 | // }, 28 | // body: obj2params(paramsObj) 29 | // }); 30 | 31 | // return result; 32 | // } 33 | -------------------------------------------------------------------------------- /packages/popup/src/fetch/tronLending/tronLending.js: -------------------------------------------------------------------------------- 1 | import Utils from '@tronlink/lib/utils'; 2 | 3 | // TronLending index 4 | export const getBankDefaultDataApi = () => { 5 | const requestUrl = `${Utils.requestUrl()}/api/bank/default_data`; 6 | return requestUrl; 7 | }; 8 | 9 | export const getBankIsRentApi = () => { 10 | const requestUrl = `${Utils.requestUrl()}/api/bank/is_rent2`; 11 | return requestUrl; 12 | }; 13 | 14 | export const getBankBalanceEnoughApi = () => { 15 | const requestUrl = `${Utils.requestUrl()}/api/bank/balance_enough`; 16 | return requestUrl; 17 | }; 18 | 19 | export const postBankOrderApi = () => { 20 | const requestUrl = `${Utils.requestUrl()}/api/bank/order`; 21 | return requestUrl; 22 | }; 23 | 24 | // TronLending page list 25 | export const getBankListApi = () => { 26 | const requestUrl = `${Utils.requestUrl()}/api/bank/list`; 27 | return requestUrl; 28 | }; 29 | 30 | // TronLending record detail 31 | export const getBankOrderInfoApi = () => { 32 | const requestUrl = `${Utils.requestUrl()}/api/bank/order_info`; 33 | return requestUrl; 34 | }; 35 | 36 | -------------------------------------------------------------------------------- /packages/popup/src/pages/TransactionsPage/Transaction/Transaction.scss: -------------------------------------------------------------------------------- 1 | .transactionsPage .transaction { 2 | background: #FFFFFF; 3 | padding: 15px; 4 | margin-bottom: 10px; 5 | display: flex; 6 | flex-direction: row; 7 | align-items: center; 8 | 9 | .transactionDetails { 10 | display: flex; 11 | flex-direction: column; 12 | flex: 1; 13 | 14 | .transactionType { 15 | font-size: 12px; 16 | font-weight: 500; 17 | 18 | &.type-TransferContractReceived, &.type-TransferAssetContractReceived { 19 | color: #38ad64; 20 | } 21 | 22 | &.type-TransferContractSent, &.type-TransferAssetContractSent { 23 | color: #f05252; 24 | } 25 | 26 | &.type-TriggerSmartContract, &.type-FreezeBalanceContract { 27 | color: #2196f3; 28 | } 29 | } 30 | 31 | .transactionAddress { 32 | font-size: 13px; 33 | margin-top: 2px; 34 | } 35 | } 36 | 37 | .transactionMeta { 38 | display: flex; 39 | flex-direction: column; 40 | justify-content: center; 41 | text-align: right; 42 | 43 | .transactionAmount { 44 | font-size: 12px; 45 | font-weight: 500; 46 | 47 | &.direction-to { 48 | color: #38ad64; 49 | } 50 | 51 | &.direction-from { 52 | color: #f05252; 53 | } 54 | } 55 | 56 | .transactionDate { 57 | font-size: 12px; 58 | } 59 | } 60 | 61 | &:last-of-type { 62 | margin-bottom: 0; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /packages/popup/src/pages/TransactionsPage/TransactionsPage.scss: -------------------------------------------------------------------------------- 1 | .transactionsPage { 2 | display: flex; 3 | flex-direction: column; 4 | flex: 1; 5 | 6 | .transactions { 7 | flex: 1; 8 | padding: 20px; 9 | overflow: hidden; 10 | 11 | .rcs-custom-scroll { 12 | .rcs-outer-container { 13 | overflow: unset; 14 | 15 | .rcs-positioning { 16 | margin-right: -20px; 17 | } 18 | } 19 | .rcs-inner-container { 20 | margin-right: -50px !important; 21 | padding-right: 33px; 22 | } 23 | 24 | .rcs-inner-handle { 25 | margin-top: 0; 26 | height: 100%; 27 | background: #454c67; 28 | margin-left: 3px; 29 | margin-right: -3px; 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /packages/popup/src/pages/TransactionsPage/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import CustomScroll from 'react-custom-scroll'; 3 | // import Transaction from './Transaction'; 4 | import AccountDetails from 'components/AccountDetails'; 5 | 6 | import { connect } from 'react-redux'; 7 | 8 | import './TransactionsPage.scss'; 9 | 10 | const TransactionsPage = ({ account }) => { 11 | // const { transactions } = account; 12 | 13 | return ( 14 |
15 | 16 |
17 | 18 | {/*{ transactions.map(transaction => (*/} 19 | {/**/} 20 | {/*)) }*/} 21 | 22 |
23 |
24 | ); 25 | }; 26 | 27 | export default connect(state => ({ 28 | account: state.accounts.selected 29 | }))(TransactionsPage); 30 | -------------------------------------------------------------------------------- /packages/popup/src/reducers/confirmationsReducer.js: -------------------------------------------------------------------------------- 1 | import { 2 | createReducer, 3 | createAction 4 | } from 'redux-starter-kit'; 5 | 6 | export const setConfirmations = createAction('setConfirmations'); 7 | 8 | export const confirmationsReducer = createReducer([], { 9 | [ setConfirmations ]: (state, { payload }) => ( 10 | payload.length && payload.map(({ confirmation }) => ( 11 | confirmation 12 | )) 13 | ) 14 | }); 15 | -------------------------------------------------------------------------------- /packages/popup/src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { appReducer } from './appReducer'; 2 | import { accountsReducer } from './accountsReducer'; 3 | import { confirmationsReducer } from './confirmationsReducer'; 4 | 5 | export default { 6 | app: appReducer, 7 | accounts: accountsReducer, 8 | confirmations: confirmationsReducer 9 | }; -------------------------------------------------------------------------------- /packages/popup/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/static/icon.png -------------------------------------------------------------------------------- /packages/popup/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TronLink/tronlink-extension/edc7bd73dec1eb56bc65ddc22ccc533cc9575834/packages/popup/static/logo.png -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | const mode = process.env.NODE_ENV || 'development'; 3 | 4 | module.exports = { 5 | entry: './index.js', 6 | devtool: 'source-map', 7 | target: 'web', 8 | module: { 9 | rules: [ 10 | { 11 | test: /\.js$/, 12 | exclude: /node_modules/, 13 | use: { 14 | loader: 'babel-loader', 15 | options: { 16 | presets: [ '@babel/preset-env' ], 17 | plugins: [ '@babel/plugin-transform-runtime', '@babel/plugin-transform-modules-commonjs' ], 18 | } 19 | } 20 | } 21 | ] 22 | }, 23 | resolve: { 24 | modules: [ '../../node_modules' ] 25 | }, 26 | plugins: [ 27 | new webpack.optimize.ModuleConcatenationPlugin(), 28 | new webpack.DefinePlugin({ 29 | ENVIRONMENT: JSON.stringify(mode) 30 | }) 31 | ], 32 | mode 33 | }; --------------------------------------------------------------------------------