forked from jsnbuchanan/crowd-funder-for-time-pwa
fix name derivation on give dialog
This commit is contained in:
@@ -112,14 +112,6 @@ export default class GiftedDialog extends Vue {
|
|||||||
async open(giver?: GiverInputInfo, offerId?: string) {
|
async open(giver?: GiverInputInfo, offerId?: string) {
|
||||||
this.description = "";
|
this.description = "";
|
||||||
this.giver = giver || {};
|
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
|
// if we show "given to user" selection, default checkbox to true
|
||||||
this.givenToUser = this.showGivenToUser;
|
this.givenToUser = this.showGivenToUser;
|
||||||
this.amountInput = "0";
|
this.amountInput = "0";
|
||||||
@@ -137,6 +129,14 @@ export default class GiftedDialog extends Vue {
|
|||||||
const allAccounts = await accountsDB.accounts.toArray();
|
const allAccounts = await accountsDB.accounts.toArray();
|
||||||
this.allMyDids = allAccounts.map((acc) => acc.did);
|
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
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.error("Error retrieving settings from database:", err);
|
console.error("Error retrieving settings from database:", err);
|
||||||
|
|||||||
Reference in New Issue
Block a user