Skip to content

Commit

Permalink
Merge pull request #793 from TokenScript/fix/issuer-query-selectors
Browse files Browse the repository at this point in the history
Fix: issuer query selectors
  • Loading branch information
nicktaras authored Aug 16, 2023
2 parents 368cf7d + feb618c commit 10c87c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/client/views/select-issuers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,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'

Expand Down Expand Up @@ -258,11 +258,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 = '<div class="lds-ellipsis lds-ellipsis-sm" style=""><div></div><div></div><div></div><div></div></div>'
Expand All @@ -271,8 +271,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')
Expand Down

0 comments on commit 10c87c4

Please sign in to comment.