Skip to content

Commit

Permalink
updated interface for tkn
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Taras authored and Nick Taras committed Oct 11, 2023
1 parent f89be97 commit 4e7d656
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/client/tokenStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface TokenLookup {
export interface TokenData {
tokenId: string | number
walletAddress?: string
image?: string
// TODO: add more common fields to this interface
[key: string]: any
}
Expand Down
3 changes: 1 addition & 2 deletions src/client/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { Start } from './views/start'

import { logger, requiredParams } from '../utils'
import { Client, ClientError } from './index'
import { ViewInterface, ViewComponent, ViewFactory, ViewConstructor } from './views/view-interface'
import { TokenStore } from './tokenStore'
import { ViewInterface, ViewComponent, ViewFactory, ViewConstructor, AbstractView } from './views/view-interface'
import { SelectIssuers } from './views/select-issuers'
import { SelectWallet } from './views/select-wallet'
import { LOCAL_STORAGE_TOKEN_STORE_KEY } from '../constants'
Expand Down
6 changes: 3 additions & 3 deletions src/client/views/view-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Client } from '../index'
import { Ui, UIOptionsInterface } from '../ui'

export interface ViewConstructor<T> {
new (client: Client, popup: Ui, viewContainer: any, params: any): T
new(client: Client, popup: Ui, viewContainer: any, params: any): T
}

export type ViewFactory = (client: Client, popup: Ui, viewContainer: any, params: any) => ViewInterface
Expand All @@ -16,7 +16,7 @@ export interface ViewInterface {
params: IViewParameters
render(): void
init(): void
update(params: IViewParameters): void
update?(params: IViewParameters): void
}

export interface IViewParameters {
Expand All @@ -40,7 +40,7 @@ export abstract class AbstractView implements ViewInterface {
}

// eslint-disable-next-line @typescript-eslint/no-empty-function
public init(): void {}
public init(): void { }

abstract render(): void

Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { Client } from './client/index'
export { AbstractView, type ViewInterface } from './client/views/view-interface'
export { Ui, UIOptionsInterface } from './client/ui'
export { Outlet } from './outlet/index'
export { Start } from './client/views/start'
export { SelectWallet } from './client/views/select-wallet'
Expand Down

0 comments on commit 4e7d656

Please sign in to comment.