From e140da081f0197a72d38f003e891fa1bfc5685c8 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 3 Feb 2024 18:10:46 -0700 Subject: [PATCH] fix name derivation on give dialog --- src/components/GiftedDialog.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index 9dda5d9c..ca4d47b4 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -112,14 +112,6 @@ export default class GiftedDialog extends Vue { async open(giver?: GiverInputInfo, offerId?: string) { this.description = ""; this.giver = giver || {}; - if (!this.giver.name) { - this.giver.name = didInfo( - this.giver.did, - this.activeDid, - this.allMyDids, - this.allContacts, - ); - } // if we show "given to user" selection, default checkbox to true this.givenToUser = this.showGivenToUser; this.amountInput = "0"; @@ -137,6 +129,14 @@ export default class GiftedDialog extends Vue { const allAccounts = await accountsDB.accounts.toArray(); this.allMyDids = allAccounts.map((acc) => acc.did); + if (!this.giver.name) { + this.giver.name = didInfo( + this.giver.did, + this.activeDid, + this.allMyDids, + this.allContacts, + ); + } // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (err: any) { console.error("Error retrieving settings from database:", err);