1
This commit is contained in:
parent
123e1760c5
commit
f0a4cd7a17
@ -32,6 +32,16 @@ async function approveErc20(session) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const contractMeta = bc.getContractByName(currencyName);
|
||||||
|
if (!contractMeta) {
|
||||||
|
session.rspErr(500, 'currency meta not found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log(contractMeta);
|
||||||
|
if (contractMeta['type'] != 'erc20') {
|
||||||
|
session.rspErr(500, 'currency meta type error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const instance = bc.getInstanceByName(currencyName);
|
const instance = bc.getInstanceByName(currencyName);
|
||||||
if (!instance) {
|
if (!instance) {
|
||||||
@ -46,7 +56,7 @@ async function approveErc20(session) {
|
|||||||
session.rspData({
|
session.rspData({
|
||||||
'trans_id' : '',
|
'trans_id' : '',
|
||||||
'trans_req': {
|
'trans_req': {
|
||||||
'to': '',
|
'to': contractMeta['address'],
|
||||||
'data': data
|
'data': data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user