diff --git a/database/migrations/0066-x-community-sendcoins-transactions_table.ts b/database/migrations/0066-x-community-sendcoins-transactions_table.ts index 2a90f297a..425248c22 100644 --- a/database/migrations/0066-x-community-sendcoins-transactions_table.ts +++ b/database/migrations/0066-x-community-sendcoins-transactions_table.ts @@ -66,8 +66,6 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis ) } -/* eslint-disable @typescript-eslint/no-empty-function */ -/* eslint-disable-next-line @typescript-eslint/no-unused-vars */ export async function downgrade(queryFn: (query: string, values?: any[]) => Promise>) { await queryFn('ALTER TABLE `transactions` DROP COLUMN `user_gradido_id`;') await queryFn('ALTER TABLE `transactions` DROP COLUMN `user_name`;') diff --git a/dht-node/src/dht_node/index.ts b/dht-node/src/dht_node/index.ts index ca00a5cee..2a7f7dd25 100644 --- a/dht-node/src/dht_node/index.ts +++ b/dht-node/src/dht_node/index.ts @@ -19,7 +19,7 @@ enum ApiVersionType { V1_1 = '1_1', V2_0 = '2_0', } -export type CommunityApi = { +type CommunityApi = { api: string url: string } @@ -250,14 +250,11 @@ async function writeHomeCommunityEntry(pubKey: string): Promise { } const newCommunityUuid = async (): Promise => { - let uuid: string - let countIds: number - do { - uuid = uuidv4() - countIds = await DbCommunity.count({ where: { communityUuid: uuid } }) - if (countIds > 0) { - logger.info('CommunityUuid creation conflict...') + while (true) { + const communityUuid = uuidv4() + if ((await DbCommunity.count({ where: { communityUuid } })) === 0) { + return communityUuid } - } while (countIds > 0) - return uuid + logger.info('CommunityUuid creation conflict...', communityUuid) + } } diff --git a/frontend/src/components/LinkInformations/RedeemInformation.vue b/frontend/src/components/LinkInformations/RedeemInformation.vue index d287605a4..7a55c5c01 100644 --- a/frontend/src/components/LinkInformations/RedeemInformation.vue +++ b/frontend/src/components/LinkInformations/RedeemInformation.vue @@ -1,11 +1,12 @@ @@ -47,12 +48,13 @@ export default { return { linkData: { __typename: 'TransactionLink', - amount: '123.45', - memo: 'memo', + amount: '', + memo: '', user: { - firstName: 'Bibi', + firstName: '', }, deletedAt: null, + validLink: false, }, } }, @@ -67,13 +69,14 @@ export default { }, }) .then((result) => { + this.validLink = true this.linkData = result.data.queryTransactionLink if (this.linkData.__typename === 'ContributionLink' && this.$store.state.token) { this.mutationLink(this.linkData.amount) } }) - .catch((err) => { - this.toastError(err.message) + .catch(() => { + this.toastError(this.$t('gdd_per_link.redeemlink-error')) }) }, mutationLink(amount) {