Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly include ethers library availabilty via Token Negotiator li… #868

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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