diff --git a/src/components/market/ChipBuyDialog.vue b/src/components/market/ChipBuyDialog.vue index 388e087..5083a16 100644 --- a/src/components/market/ChipBuyDialog.vue +++ b/src/components/market/ChipBuyDialog.vue @@ -102,7 +102,7 @@ export default { data() { return { piece: "", - orderId: 0, + orderId: 1, chainManager: new ChainManager(), dialogVisible: false, }; @@ -111,8 +111,10 @@ export default { async haldBuy() { try { const nftres = await this.chainManager.bc.beginBuy( - this.orderId, - CONTRACT_ADDRESS["1338"].address + this.piece.orderId ? this.piece.orderId : this.data.orderId, + this.piece.s_price ? this.piece.s_price : this.data.s_price, + this.piece.currency ? this.piece.currency : this.data.currency, + CONTRACT_ADDRESS[AppModule.chainId].marketDddress ); console.log(nftres, "beginSell"); } catch (err) { @@ -125,7 +127,6 @@ export default { }, init(data) { this.piece = data; - }, }, }; diff --git a/src/components/market/HeroBuyDialog.vue b/src/components/market/HeroBuyDialog.vue index c487cb4..64db51d 100644 --- a/src/components/market/HeroBuyDialog.vue +++ b/src/components/market/HeroBuyDialog.vue @@ -70,7 +70,7 @@ export default { async haldBuy(){ try { const nftres = await this.chainManager.bc.beginBuy( - this.orderId, + this.data.orderId, this.data.s_price, this.data.currency, CONTRACT_ADDRESS[AppModule.chainId].marketDddress diff --git a/src/components/market/TheSellDialog.vue b/src/components/market/TheSellDialog.vue index 8d871f4..e9d8c2e 100644 --- a/src/components/market/TheSellDialog.vue +++ b/src/components/market/TheSellDialog.vue @@ -106,6 +106,7 @@ export default { nft_Token: "", chainManager: new ChainManager(), cunout: 1, + orderId:1, dialogVisible: false, isWeapon: false, options: [], diff --git a/src/components/market/WeaponBuyDialog.vue b/src/components/market/WeaponBuyDialog.vue index 7402ac6..c985542 100644 --- a/src/components/market/WeaponBuyDialog.vue +++ b/src/components/market/WeaponBuyDialog.vue @@ -97,11 +97,13 @@ export default { }; }, methods: { - async haldBuy() { + async haldBuy(){ try { const nftres = await this.chainManager.bc.beginBuy( - this.orderId, - CONTRACT_ADDRESS["1338"].address + this.data.orderId, + this.data.s_price, + this.data.currency, + CONTRACT_ADDRESS[AppModule.chainId].marketDddress ); console.log(nftres, "beginSell"); } catch (err) {