Skip to content

Commit

Permalink
Bug fixed: duplicate transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
atlantis-l committed Feb 15, 2024
1 parent 6ed282a commit 2009768
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/views/token-transfer/MultipleToSingle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -788,11 +788,19 @@ export default defineComponent({
}
}
const checkedAddressList: string[] = [];
if (!this.tokenType) {
this.wallets.map((data) => {
this.wallets.forEach((data) => {
let amount: string | undefined;
const resources = this.addressAndResourcesMap.get(data[addressField]);
const address = data[addressField];
if (checkedAddressList.includes(address)) return;
checkedAddressList.push(address);
const resources = this.addressAndResourcesMap.get(address);
if (resources) {
const info = resources.fungible.find(
Expand Down Expand Up @@ -828,7 +836,13 @@ export default defineComponent({
});
} else {
this.wallets.forEach((data) => {
const resources = this.addressAndResourcesMap.get(data[addressField]);
const address = data[addressField];
if (checkedAddressList.includes(address)) return;
checkedAddressList.push(address);
const resources = this.addressAndResourcesMap.get(address);
if (resources) {
const info = resources.nonFungible.find(
Expand Down

0 comments on commit 2009768

Please sign in to comment.