update js lib

This commit is contained in:
CounterFire2023 2023-06-20 17:22:41 +08:00
parent cb3b138c8a
commit a11c57ed8c
2 changed files with 14 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -254,13 +254,22 @@ function beginPay(funId, crypto, address, fiat, fiatAmount, payWayCode, country,
} }
// ======= end of pay ======= // ======= end of pay =======
// ======= begin of transaction history ======= // ======= begin of transaction history =======
function ethHistory(funId, start, limit) { /**
promiseCb(funId, jc.wallet.historySvr.ethRecords(start, limit)); *
* @param {*} funId
* @param {*} start
* @param {*} limit
* @param {*} moreParam e.g. {timeBegin: 1655716867832, timeEnd: 1655716867832}
*/
function ethHistory(funId, start, limit, moreParam) {
moreParam = moreParam ? JSON.parse(moreParam) : {};
promiseCb(funId, jc.wallet.historySvr.ethRecords(start, limit, moreParam));
} }
function tokenHistory(funId, start, limit, address, tokenId) { function tokenHistory(funId, start, limit, address, tokenId, moreParam) {
moreParam = moreParam ? JSON.parse(moreParam) : {};
var data = { start, limit, address, tokenId }; var data = { start, limit, address, tokenId };
promiseCb(funId, jc.wallet.historySvr.tokenRecords(data)); promiseCb(funId, jc.wallet.historySvr.tokenRecords(data, moreParam));
} }
// ======= end of transaction history ======= // ======= end of transaction history =======