Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix collected count not update after transfer & hide transfer button in NFT Class details #796

Merged
merged 2 commits into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/NFTPage/ControlBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div class="flex items-center">
<div v-if="isCollector && view !== 'created'" class="flex gap-[12px]">
<ButtonV2
v-if="currentNftId"
size="mini"
preset="tertiary"
content-class="!text-[12px]"
Expand Down
5 changes: 4 additions & 1 deletion src/mixins/nft.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,10 @@ export default {
this.classId,
1
);
await this.updateNFTOwners(); // blocking update firstCollectedNFTId
await Promise.all([
this.updateNFTOwners(), // blocking update firstCollectedNFTId,
this.fetchUserCollectedCount(),
]);
this.uiSetTxStatus(TX_STATUS.COMPLETED);
} catch (error) {
this.uiSetTxError(error.response?.data || error.toString());
Expand Down
15 changes: 0 additions & 15 deletions src/pages/nft/class/_classId/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@
</section>
</div>
</div>

<EventModalTransfer
:is-open="isOpenTransferModal"
:is-transferring="isTransferring"
:class-id="classId"
:user-collected-count="userCollectedCount"
:user-collected-nft-ids="userCollectedNFTList"
@close="isOpenTransferModal = false; isTransferring = false"
@submit="handleTransfer"
/>
</Page>
</template>

Expand Down Expand Up @@ -296,11 +286,6 @@ export default {
this.uiSetTxStatus('');
this.fetchUserCollectedCount();
},
async handleTransfer({ nftId, memo, toWallet }) {
logTrackerEvent(this, 'NFT', 'NFTTransfer(DetailsPage)', nftId, 1);
this.isTransferring = true;
await this.transferNFT({ nftId, memo, toWallet });
},
async handleCollect() {
logTrackerEvent(this, 'NFT', 'NFTCollect(DetailsPage)', this.classId, 1);
try {
Expand Down