Skip to content

Commit

Permalink
hide auto-receive for non-local account
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenLiuxt committed Feb 28, 2023
1 parent de4ab87 commit 069460f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 35 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"testBuild:H5": "npm run clean:H5 && NODE_ENV=production VITE_NET=buidl isH5=true webpack && NODE_ENV=production isH5=true node ./pack/afterPack.js",
"testBuild:all": "npm run testBuild && npm run testBuild:H5 && mv distH5/ dist/mobiledex",
"dev": "NODE_ENV=dev webpack-dev-server",
"dev:prod": "API=production npm run dev",
"dev:prod": "API=production VITE_NET=mainnet npm run dev",
"analyzer": "NODE_ENV=production analyzer=true isPC=true webpack-dev-server",
"lint:all": "eslint --ext ts,js,vue --fix .",
"lint": "eslint --ext ts,js,vue --cache --fix .",
Expand Down Expand Up @@ -98,8 +98,8 @@
"@vite/bridge": "^1.0.14",
"@vite/connector": "^0.0.2-0",
"@vite/ledgerjs-hw-app-vite": "^1.0.0",
"@vite/vitejs": "2.3.19-alpha.2",
"@vite/vitejs-ws": "^2.3.12",
"@vite/vitejs": "^2.3.19",
"@vite/vitejs-ws": "^2.3.19",
"ant-design-vue": "^1.7.8",
"babel-plugin-syntax-dynamic-import": "~6.18.0",
"babel-preset-minify": "^0.5.0",
Expand Down Expand Up @@ -133,7 +133,7 @@
"qrcode.es": "~1.0.0",
"qs": "~6.5.2",
"sass-resources-loader": "^2.0.1",
"testwebworker": "git+https://github.com/vitelabs/cryptojsAccelerator.git",
"testwebworker": "https://github.com/vitelabs/cryptojsAccelerator.git",
"url": "~0.11.0",
"vue-echarts": "~4.0.1",
"vue-flatpickr-component": "~8.1.1",
Expand Down
9 changes: 8 additions & 1 deletion srcPC/pages/setting/netInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span class="title">{{ $t('setting.rpcUrl') }}</span>
<code v-html="env.currentNode"></code>
<span class="small-btn" @click="openNodeChangeDialog">{{$t('setting.changeRpcUrl')}}</span>
<span class="auto-receive-switch">
<span class="auto-receive-switch" v-if="!!isLogin&&!currHDAcc.isSeparateKey">
<span>Auto-Receive</span>
<a-switch
:size="'small'"
Expand Down Expand Up @@ -67,6 +67,7 @@ import openUrl from 'utils/openUrl';
import { getExplorerLink } from 'utils/getLink';
import { getProvider } from 'services/apiServer';
import { changeRpcUrlDialog, changePowUrlDialog } from 'pcComponents/dialog';
import { StatusMap } from 'wallet';
export default {
mounted() {
Expand All @@ -91,6 +92,12 @@ export default {
...mapState(['env']),
height() {
return this.$store.state.ledger.currentHeight;
},
isLogin() {
return this.$store.state.wallet.status === StatusMap.UNLOCK;
},
currHDAcc() {
return this.$store.state.wallet.currHDAcc;
}
},
methods: {
Expand Down
43 changes: 13 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1740,15 +1740,15 @@
bip32-path "^0.4.2"
blakejs "^1.1.0"

"@vite/vitejs-ws@^2.3.12":
version "2.3.12"
resolved "https://registry.yarnpkg.com/@vite/vitejs-ws/-/vitejs-ws-2.3.12.tgz#ab5e1c00f94542a79800b70589dbbb675ce5648b"
integrity sha512-K5w6SP6L4quNXrOJw30wxrQkREHtP2/Q/3r6kGjrro8yb1HgxJD9jbNL373h/AAXTqI75QUEPUygyRa1KOMknQ==
"@vite/vitejs-ws@^2.3.19":
version "2.3.19"
resolved "https://registry.yarnpkg.com/@vite/vitejs-ws/-/vitejs-ws-2.3.19.tgz#4f428162bd7ff593bcc7b6ce0d91c24397c4ba36"
integrity sha512-o5oQviQutbvK9VXnY/en7nRyNybhWkvsADy88xHFC7KwoFFvzSKYkwkjjIwaHrndJpo9v7CptuNUJi7wEHJ/NA==

"@vite/vitejs@2.3.19-alpha.2":
version "2.3.19-alpha.2"
resolved "https://registry.npmmirror.com/@vite/vitejs/-/vitejs-2.3.19-alpha.2.tgz#1f6446a4279d9cecbbf3a92bf3121f686c54653f"
integrity sha512-VC73axWdA8K727OmysxwBmuHwUmCdRnFAqskSBf1kzFXnN2QdbK4Zb/X1sj0kbbpPLJQNBHkUvyo833U86svDQ==
"@vite/vitejs@^2.3.19":
version "2.3.19"
resolved "https://registry.yarnpkg.com/@vite/vitejs/-/vitejs-2.3.19.tgz#1c59e40a4bd1d4c39cb921e2cbf7d08365e87ef2"
integrity sha512-wwRnEyVIm5ZjYpv2wt408WdsnNnQcc4tu4uk+TtOunbFsYGvCMaVqHZrQ+Qg6Vl/LF62nOUJphOZtwHYG9CZfA==
dependencies:
"@sisi/ed25519-blake2b-hd-key" "^1.0.2"
"@sisi/tweetnacl-blake2b" "^1.0.0"
Expand All @@ -1763,7 +1763,6 @@
jsonrpc-lite "^2.2.0"
net "^1.0.2"
pure-uuid "^1.6.2"
qs "^6.10.3"
scryptsy "^2.1.0"
websocket "^1.0.34"
xhr2 "^0.2.1"
Expand Down Expand Up @@ -10039,13 +10038,6 @@ qs@6.7.0:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==

qs@^6.10.3:
version "6.10.3"
resolved "https://registry.npmmirror.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e"
integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==
dependencies:
side-channel "^1.0.4"

qs@~6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
Expand Down Expand Up @@ -10973,15 +10965,6 @@ shebang-regex@^1.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=

side-channel@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==
dependencies:
call-bind "^1.0.0"
get-intrinsic "^1.0.2"
object-inspect "^1.9.0"

signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
Expand Down Expand Up @@ -11730,9 +11713,9 @@ terser@^4.1.2:
source-map "~0.6.1"
source-map-support "~0.5.12"

"testwebworker@git+https://github.com/vitelabs/cryptojsAccelerator.git":
"testwebworker@https://github.com/vitelabs/cryptojsAccelerator.git":
version "1.0.0"
resolved "git+https://github.com/vitelabs/cryptojsAccelerator.git#060975e9a7e42282c42f24ca95d84fd7251d7155"
resolved "https://github.com/vitelabs/cryptojsAccelerator.git#060975e9a7e42282c42f24ca95d84fd7251d7155"
dependencies:
"@babel/core" "^7.1.6"
"@babel/plugin-transform-async-to-generator" "^7.1.0"
Expand Down Expand Up @@ -12775,7 +12758,7 @@ web3-providers-ws@1.0.0-beta.33:
dependencies:
underscore "1.8.3"
web3-core-helpers "1.0.0-beta.33"
websocket "https://github.com/frozeman/WebSocket-Node.git#browserifyCompatible"
websocket "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible"

web3-shh@1.0.0-beta.33:
version "1.0.0-beta.33"
Expand Down Expand Up @@ -12977,9 +12960,9 @@ websocket@^1.0.34:
utf-8-validate "^5.0.2"
yaeti "^0.0.6"

"websocket@https://github.com/frozeman/WebSocket-Node.git#browserifyCompatible":
"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible":
version "1.0.26"
resolved "https://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
resolved "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
dependencies:
debug "^2.2.0"
nan "^2.3.3"
Expand Down

0 comments on commit 069460f

Please sign in to comment.