增加usdt, usdc购买ceg的功能

This commit is contained in:
CounterFire2023 2023-07-27 17:20:41 +08:00
parent 285b3244c5
commit ba15778dfc
2 changed files with 32 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -507,6 +507,21 @@ function nftMallBuy(funId, currency, addresses, ids, amounts, values, signature,
// end of NFT mall
// begin of token mall
// buy ceg with usdt, usdc
function buyTokenWithErc20(funId, currency, amount, gas, estimate) {
promiseCb(
funId,
jc.wallet.jcStandard.buyTokenWithErc20({
currency,
amount,
estimate,
}),
(v) => JSON.stringify(v)
);
}
// begin of token mall
// begin of google pay
function queryGoogleProducts(funId, productIds) {
let ids = JSON.parse(productIds);
@ -523,3 +538,14 @@ function beginGoogleBuy(funId, productId, orderId) {
}
// end of google pay
// begin of iOS in-app pay
function queryIOSProducts(funId, productIds) {
let ids = JSON.parse(productIds);
console.log('queryIOSProducts:: ' + productIds);
promiseCb(funId, jc.wallet.paySvr.queryIOSProducts(ids));
}
function beginAppleBuy(funId, productId, orderId) {
promiseCb(funId, jc.wallet.paySvr.beginIOSPurchase(productId, orderId));
}