From 5e422b109a1fb4a7926e6bdf58d5f54b8bbd00d2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 4 Aug 2023 13:41:06 +0800 Subject: [PATCH] 1 --- server/web3sign/controllers/game_item_mall.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/web3sign/controllers/game_item_mall.js b/server/web3sign/controllers/game_item_mall.js index d854c2b..211fd98 100644 --- a/server/web3sign/controllers/game_item_mall.js +++ b/server/web3sign/controllers/game_item_mall.js @@ -10,6 +10,7 @@ async function buy(session) { const account = bcutils.toNormalAddress(session.request('account', '')); const netId = session.request('net_id'); const price = session.request('price'); + const currencyName = session.request('currency_name'); const bc = serviceFactory.create('BlockChain'); { const ret = await bc.init(netId); @@ -25,7 +26,7 @@ async function buy(session) { } } - const currency = bc.getContractAddressByName(contract.CEG_INSTANCE_NAME); + const currency = bc.getContractAddressByName(currencyName); const userAddress = bc.getUserAddress(); { if (!bc.isValidAddress(currency)) {