Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dapp-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhanglian
dapp-web
Commits
0d98ef96
提交
0d98ef96
authored
1月 05, 2022
作者:
zhanglian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
转账后刷新余额
上级
cf900c99
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
117 行增加
和
126 行删除
+117
-126
loginService.js
src/service/loginService.js
+0
-1
index.js
src/utils/data/index.js
+0
-42
tokenList.js
src/utils/data/tokenList.js
+105
-0
thinkiumBridge.vue
src/views/thinkiumBridge/thinkiumBridge.vue
+12
-83
没有找到文件。
src/service/loginService.js
浏览文件 @
0d98ef96
...
@@ -12,7 +12,6 @@ export async function connectWallet(){
...
@@ -12,7 +12,6 @@ export async function connectWallet(){
store
.
commit
(
'network/SET_CHAIN_ID'
,
''
)
store
.
commit
(
'network/SET_CHAIN_ID'
,
''
)
const
{
address
}
=
await
init
();
const
{
address
}
=
await
init
();
const
chainId
=
await
getChainId
();
const
chainId
=
await
getChainId
();
console
.
log
(
'----chainId-typeof'
,
typeof
chainId
);
if
(
chainId
&&
address
)
{
if
(
chainId
&&
address
)
{
// let signature,expireTime;
// let signature,expireTime;
// if (interfaceSignature.signatureHasExpired(chainId, address)) {
// if (interfaceSignature.signatureHasExpired(chainId, address)) {
...
...
src/utils/data/index.js
deleted
100644 → 0
浏览文件 @
cf900c99
export
const
skillList
=
[
{
name
:
'打破不可能三角神话'
,
imgUrl
:
require
(
'@/assets/images/home/skill1.png'
)
},
{
name
:
'复杂合约高并发'
,
imgUrl
:
require
(
'@/assets/images/home/skill2.png'
)
},
{
name
:
'公链的公链解决方案'
,
imgUrl
:
require
(
'@/assets/images/home/skill3.png'
)
},
{
name
:
'分层多级链万能架构'
,
imgUrl
:
require
(
'@/assets/images/home/skill4.png'
)
},
{
name
:
'公链与联盟链可信融合'
,
imgUrl
:
require
(
'@/assets/images/home/skill5.png'
)
}
]
export
const
becomeDevpolerList
=
[
{
name
:
'核心开发者'
,
imgUrl
:
require
(
'@/assets/images/develoader/develoaderIcon1.png'
)
},
{
name
:
'工具开发者'
,
imgUrl
:
require
(
'@/assets/images/develoader/develoaderIcon2.png'
)
},
{
name
:
'DAPP开发者'
,
imgUrl
:
require
(
'@/assets/images/develoader/develoaderIcon3.png'
)
},
{
name
:
'更多想法'
,
imgUrl
:
require
(
'@/assets/images/develoader/develoaderIcon4.png'
)
},
]
src/utils/data/tokenList.js
0 → 100644
浏览文件 @
0d98ef96
const
tokenListLocal
=
[
]
const
tokenListDev
=
[{
name
:
'TKM'
,
index
:
1
,
chainName
:
'tkm'
,
chainId
:
60001
,
url
:
''
,
balance
:
'0'
,
type
:
'main'
,
contractAddress
:
''
,
},
{
name
:
'TUSDT'
,
index
:
2
,
chainName
:
'tkm'
,
chainId
:
60001
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x630dDb5C384F4cB489E43d74a6722B26635b65bE'
,
},
{
name
:
'BTKM'
,
index
:
1
,
chainName
:
'bsc'
,
chainId
:
97
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x0806c5b183F8a622fE62c7344B04e6e6A7C82c2e'
,
},
{
name
:
'BUSDT'
,
index
:
2
,
chainName
:
'bsc'
,
chainId
:
97
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x3b319043334f483a931ad6555b17fc4a55f3c64a'
,
},
{
name
:
'TKM3'
,
index
:
3
,
chainName
:
'tkm'
,
chainId
:
60001
,
url
:
''
,
balance
:
'0'
,
type
:
'main'
,
contractAddress
:
''
,
},
{
name
:
'TUSDT3'
,
index
:
4
,
chainName
:
'tkm'
,
chainId
:
60001
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x630dDb5C384F4cB489E43d74a6722B26635b65bE'
,
},
{
name
:
'BTKM3'
,
index
:
3
,
chainName
:
'bsc'
,
chainId
:
1337
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x0806c5b183F8a622fE62c7344B04e6e6A7C82c2e'
,
},
{
name
:
'BUSDT3'
,
index
:
4
,
chainName
:
'bsc'
,
chainId
:
1337
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x3b319043334f483a931ad6555b17fc4a55f3c64a'
,
},
]
const
tokenListPro
=
[
]
export
function
getTokenList
(
currentChainId
){
currentChainId
-=
0
;
// if([60001, 97, 1337].includes(currentChainId)){
// return tokenListDev;
// }else{
// return tokenListPro;
// }
return
tokenListDev
;
}
\ No newline at end of file
src/views/thinkiumBridge/thinkiumBridge.vue
浏览文件 @
0d98ef96
...
@@ -65,6 +65,7 @@ import { BigNumber } from 'bignumber.js'
...
@@ -65,6 +65,7 @@ import { BigNumber } from 'bignumber.js'
import
*
as
metaMask
from
'@/api/demoMETAMASK'
;
import
*
as
metaMask
from
'@/api/demoMETAMASK'
;
import
EDialog
from
'@/components/EDialog.vue'
;
import
EDialog
from
'@/components/EDialog.vue'
;
import
{
createNamespacedHelpers
}
from
'vuex'
;
import
{
createNamespacedHelpers
}
from
'vuex'
;
import
{
getTokenList
}
from
'@/utils/data/tokenList'
const
{
mapState
:
mapStateWallet
}
=
createNamespacedHelpers
(
'wallet'
);
const
{
mapState
:
mapStateWallet
}
=
createNamespacedHelpers
(
'wallet'
);
const
{
mapState
:
mapStateNetwork
}
=
createNamespacedHelpers
(
'network'
);
const
{
mapState
:
mapStateNetwork
}
=
createNamespacedHelpers
(
'network'
);
...
@@ -80,87 +81,7 @@ export default {
...
@@ -80,87 +81,7 @@ export default {
dialogVisible
:
false
,
dialogVisible
:
false
,
pageLoading
:
false
,
pageLoading
:
false
,
tokenList
:
[],
tokenList
:
[],
tokenListOrigin
:
[{
tokenListOrigin
:
[],
name
:
'TKM'
,
index
:
1
,
chainName
:
'tkm'
,
chainId
:
60001
,
url
:
''
,
balance
:
'0'
,
type
:
'main'
,
contractAddress
:
''
,
},
{
name
:
'TUSDT'
,
index
:
2
,
chainName
:
'tkm'
,
chainId
:
60001
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x630dDb5C384F4cB489E43d74a6722B26635b65bE'
,
},
{
name
:
'TKM3'
,
index
:
3
,
chainName
:
'tkm'
,
chainId
:
60001
,
url
:
''
,
balance
:
'0'
,
type
:
'main'
,
contractAddress
:
''
,
},
{
name
:
'TUSDT3'
,
index
:
4
,
chainName
:
'tkm'
,
chainId
:
60001
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x630dDb5C384F4cB489E43d74a6722B26635b65bE'
,
},
{
name
:
'BTKM'
,
index
:
1
,
chainName
:
'bsc'
,
chainId
:
97
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x0806c5b183F8a622fE62c7344B04e6e6A7C82c2e'
,
},
{
name
:
'BUSDT'
,
index
:
2
,
chainName
:
'bsc'
,
chainId
:
97
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x3b319043334f483a931ad6555b17fc4a55f3c64a'
,
},
{
name
:
'BTKM3'
,
index
:
3
,
chainName
:
'bsc'
,
chainId
:
1337
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x0806c5b183F8a622fE62c7344B04e6e6A7C82c2e'
,
},
{
name
:
'BUSDT3'
,
index
:
4
,
chainName
:
'bsc'
,
chainId
:
1337
,
url
:
''
,
balance
:
'0'
,
type
:
'erc20'
,
contractAddress
:
'0x3b319043334f483a931ad6555b17fc4a55f3c64a'
,
},
],
tokenListTKM
:
[],
tokenListTKM
:
[],
tokenListBSC
:
[],
tokenListBSC
:
[],
selectIndex
:
''
,
selectIndex
:
''
,
...
@@ -176,6 +97,7 @@ export default {
...
@@ -176,6 +97,7 @@ export default {
},
},
changeItem
:
''
,
changeItem
:
''
,
inputValue
:
''
,
inputValue
:
''
,
rbalance
:
1
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -194,15 +116,16 @@ export default {
...
@@ -194,15 +116,16 @@ export default {
asyncComputed
:
{
asyncComputed
:
{
balance
:
{
balance
:
{
get
()
{
get
()
{
console
.
log
(
'--this.holdItem'
,
this
.
holdItem
);
const
{
coinData
}
=
this
.
holdItem
;
const
{
coinData
}
=
this
.
holdItem
;
console
.
log
(
coinData
.
chainId
,
this
.
chainId
);
if
(
!
this
.
walletConnected
)
{
if
(
!
this
.
walletConnected
)
{
return
0
;
return
0
;
}
}
if
(
coinData
.
chainId
!=
this
.
chainId
)
{
if
(
coinData
.
chainId
!=
this
.
chainId
)
{
this
.
networkAlert
();
this
.
networkAlert
();
return
0
;
return
0
;
}
if
(
!
this
.
rbalance
){
}
}
if
(
coinData
.
type
==
'main'
)
{
if
(
coinData
.
type
==
'main'
)
{
return
this
.
getAccountBalance
().
then
(
res
=>
res
);
return
this
.
getAccountBalance
().
then
(
res
=>
res
);
...
@@ -228,6 +151,7 @@ export default {
...
@@ -228,6 +151,7 @@ export default {
}
}
bridge
=
new
window
.
web3
.
eth
.
Contract
(
bridgeAbi
,
bridgeContractAddress
,
overrides
);
bridge
=
new
window
.
web3
.
eth
.
Contract
(
bridgeAbi
,
bridgeContractAddress
,
overrides
);
this
.
tokenListOrigin
=
getTokenList
(
this
.
chainId
);
this
.
tokenListTKM
=
this
.
getTokensByChainName
(
'tkm'
)
||
[];
this
.
tokenListTKM
=
this
.
getTokensByChainName
(
'tkm'
)
||
[];
this
.
tokenListBSC
=
this
.
getTokensByChainName
(
'bsc'
)
||
[];
this
.
tokenListBSC
=
this
.
getTokensByChainName
(
'bsc'
)
||
[];
...
@@ -253,8 +177,12 @@ export default {
...
@@ -253,8 +177,12 @@ export default {
if
(
!
token
)
{
if
(
!
token
)
{
token
=
this
.
getTokensByChainName
(
this
.
holdItem
.
chainName
)[
0
]
token
=
this
.
getTokensByChainName
(
this
.
holdItem
.
chainName
)[
0
]
}
}
console
.
log
(
'----123'
,
token
);
this
.
changeSelect
(
0
,
token
)
this
.
changeSelect
(
0
,
token
)
},
},
refreshBalance
(){
this
.
rbalance
++
},
formateChainName
(
chainId
)
{
formateChainName
(
chainId
)
{
let
tkmChainIds
=
this
.
tokenListTKM
.
map
(
item
=>
item
.
chainId
);
let
tkmChainIds
=
this
.
tokenListTKM
.
map
(
item
=>
item
.
chainId
);
let
bscChainIds
=
this
.
tokenListBSC
.
map
(
item
=>
item
.
chainId
);
let
bscChainIds
=
this
.
tokenListBSC
.
map
(
item
=>
item
.
chainId
);
...
@@ -362,6 +290,7 @@ export default {
...
@@ -362,6 +290,7 @@ export default {
});
});
}
}
this
.
$notify
({
type
:
'success'
,
message
:
'转账成功'
});
this
.
$notify
({
type
:
'success'
,
message
:
'转账成功'
});
this
.
refreshBalance
();
}
catch
(
err
)
{
}
catch
(
err
)
{
this
.
$notify
({
type
:
'warning'
,
message
:
'转账失败'
});
this
.
$notify
({
type
:
'warning'
,
message
:
'转账失败'
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论