diff --git a/index.html b/index.html index dc5fc0e1..295d5118 100644 --- a/index.html +++ b/index.html @@ -36,14 +36,6 @@ path: "http://localhost:5000/user-login-callback", params: {} }, - userLogout: { - path: "http://localhost:5000/user-logout", - params: {} - }, - userSignature: { - path: 'http://localhost:5000/user-signature', - params: {} - }, userBalance: { path: 'http://localhost:5000/user-balance', params: {} diff --git a/src/client/index.ts b/src/client/index.ts index f44f4b76..925ff4e8 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -137,11 +137,6 @@ export class Client { // this.registerOutletProofEventListener() } - async testSig() { - let res = await fetch('http://localhost:5000/user-signature?message=hola', {}) - console.log(res) - } - handleRecievedRedirectMessages() { const issuer = this.getDataFromQuery('issuer') const error = this.getDataFromQuery('error') diff --git a/src/client/interface.ts b/src/client/interface.ts index eb0e18c8..f1f59cd1 100644 --- a/src/client/interface.ts +++ b/src/client/interface.ts @@ -65,13 +65,13 @@ export interface Oauth2IssuerConfig { path: string params?: object } - userAccessToken: { + userBalance?: { path: string - params?: object + params: object } - userLogout: { + userNfts?: { path: string - params?: object + params: object } } } diff --git a/src/utils/token/fungibleTokenProvider.ts b/src/utils/token/fungibleTokenProvider.ts index ab83a0c0..7d000900 100644 --- a/src/utils/token/fungibleTokenProvider.ts +++ b/src/utils/token/fungibleTokenProvider.ts @@ -10,10 +10,6 @@ export const getFungibleTokenBalances = async (issuer: OnChainIssuer, owner: str if (ipfsBaseUrl) query += `&ipfsBaseUrl=${ipfsBaseUrl}` if (issuer.oAuth2options) { query = issuer.oAuth2options.endpoints.userBalance.path; - // TODO when a user clicks load - // if(isCookieExpired(`tn-oauth2-expiry-${issuer.collectionID}`)) { - // ui.updateUI('wallet', { viewName: 'wallet' }, { viewTransition: 'slide-in-left' }) - // } } return tokenRequest(query, true) } diff --git a/src/wallet/Web3WalletProvider.ts b/src/wallet/Web3WalletProvider.ts index 6c78a461..3054d158 100644 --- a/src/wallet/Web3WalletProvider.ts +++ b/src/wallet/Web3WalletProvider.ts @@ -106,8 +106,8 @@ export class Web3WalletProvider { if (state) { for (let item in state) { let provider = state[item].providerType - switch (provider) { - case 'WalletConnectV2': + switch (provider.toLowerCase()) { + case 'walletconnectV2': { let walletConnect2Provider = await import('./WalletConnectV2Provider') @@ -125,8 +125,7 @@ export class Web3WalletProvider { } break case 'socios': - console.log('remove socios wallet from local storage') - // deleteCookieByName(provider.expiryCookieName); + deleteCookieByName(`tn-oauth2-expiry-socios`) break } } @@ -496,19 +495,17 @@ export class Web3WalletProvider { let client_id let redirect_uri let partner_tag - let collectionID for (const issuer of this.client.config.issuers) { const oauthIssuer = issuer as Oauth2IssuerConfig if (oauthIssuer.oAuth2options.consumerKey) { client_id = oauthIssuer.oAuth2options.consumerKey redirect_uri = oauthIssuer.oAuth2options.endpoints.redirectURI.path partner_tag = oauthIssuer.oAuth2options.partnerTag - collectionID = oauthIssuer.collectionID break } } - if (isCookieMaxAgeExpired(`tn-oauth2-expiry-${collectionID}`)) { + if (isCookieMaxAgeExpired(`tn-oauth2-expiry-socios`)) { // @ts-ignore this.client.ui.showLoaderDelayed(['