Skip to content

Commit

Permalink
Explicitly include ethers library availabilty via Token Negotiator li…
Browse files Browse the repository at this point in the history
…brary interface
  • Loading branch information
Nick Taras authored and Nick Taras committed Oct 13, 2023
1 parent 9f42358 commit d4e1003
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Feature release including multi-hook support, improved UX for off chain token ho
- Re-direct accept / deny options given to end user (to cancel the loading of tokens)
- Multi-Hook support added
- Added selected token issuer keys to 'tokens-selected' event hook
- Explicitly include ethers library availabilty via Token Negotiator library interface via `client.externalUtils.evm.ethers`

### Bug Fixes

Expand Down
8 changes: 7 additions & 1 deletion src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ import { shouldUseRedirectMode } from '../utils/support/getBrowserData'
import { VERSION } from '../version'
import { getFungibleTokenBalances, getFungibleTokensMeta } from '../utils/token/fungibleTokenProvider'
import { URLNS } from '../core/messaging'
import { DecodedToken, TokenType } from '../outlet/ticketStorage'
import { TokenType } from '../outlet/ticketStorage'
import { MultiTokenAuthRequest, MultiTokenAuthResult, OutletIssuerInterface, ProofResult } from '../outlet/interfaces'
import { AttestationIdClient } from '../outlet/attestationIdClient'
import { EventHookHandler } from './eventHookHandler'
import { ethers } from 'ethers'

if (typeof window !== 'undefined') window.tn = { VERSION }

Expand Down Expand Up @@ -109,6 +110,11 @@ export class Client {
private eventHookHandler: EventHookHandler
protected ui: UiInterface
protected tokenStore: TokenStore
public externalUtils = {
evm: {
ethers,
},
}
private uiUpdateCallbacks: { [type in UIUpdateEventType] } = {
[UIUpdateEventType.ISSUERS_LOADING]: undefined,
[UIUpdateEventType.ISSUERS_LOADED]: undefined,
Expand Down

0 comments on commit d4e1003

Please sign in to comment.