From feb618cafba00d1f622ebcd11b4d21a4dc0cdd30 Mon Sep 17 00:00:00 2001 From: Michael Wallace Date: Wed, 16 Aug 2023 10:55:59 +1000 Subject: [PATCH] fix: issuer list query selector Remove asterisk to select by exact match. --- src/client/views/select-issuers.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/views/select-issuers.ts b/src/client/views/select-issuers.ts index 6f501535..c1055ce4 100644 --- a/src/client/views/select-issuers.ts +++ b/src/client/views/select-issuers.ts @@ -216,7 +216,7 @@ export class SelectIssuers extends AbstractView { this.issuerLoading.bind(this), (issuer: string, tokens: any[]) => { if (!tokens?.length) { - const connectBtn = this.issuerListContainer.querySelector(`[data-issuer*="${issuer}"] .connect-btn-tn`) + const connectBtn = this.issuerListContainer.querySelector(`[data-issuer="${issuer}"] .connect-btn-tn`) if (connectBtn) connectBtn.innerText = 'Load' @@ -260,11 +260,11 @@ export class SelectIssuers extends AbstractView { } issuerLoading(issuer: string) { - const tokensBtn = this.issuerListContainer.querySelector(`[data-issuer*="${issuer}"] .tokens-btn-tn`) + const tokensBtn = this.issuerListContainer.querySelector(`[data-issuer="${issuer}"] .tokens-btn-tn`) if (tokensBtn) tokensBtn.style.display = 'none' - const connectBtn = this.issuerListContainer.querySelector(`[data-issuer*="${issuer}"] .connect-btn-tn`) + const connectBtn = this.issuerListContainer.querySelector(`[data-issuer="${issuer}"] .connect-btn-tn`) if (connectBtn) { connectBtn.innerHTML = '
' @@ -273,8 +273,8 @@ export class SelectIssuers extends AbstractView { } issuerConnected(issuer: string, tokens: any[], showTokens = true) { - const connectBtn = this.issuerListContainer.querySelector(`[data-issuer*="${issuer}"] .connect-btn-tn`) - const tokenBtn = this.issuerListContainer.querySelector(`[data-issuer*="${issuer}"] .tokens-btn-tn`) + const connectBtn = this.issuerListContainer.querySelector(`[data-issuer="${issuer}"] .connect-btn-tn`) + const tokenBtn = this.issuerListContainer.querySelector(`[data-issuer="${issuer}"] .tokens-btn-tn`) if (!connectBtn || !tokenBtn) { logger(2, 'Could not find button handler')