Skip to content

Commit

Permalink
Merge pull request #865 from TokenScript/release/3.2.0
Browse files Browse the repository at this point in the history
updated interface for tkn
  • Loading branch information
nicktaras committed Oct 11, 2023
2 parents 1618820 + 4dbba5e commit a46ca7d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature release including multi-hook support and improved UX for off chain token

### Bug Fixes

[none]
- TS interface custom views

### Performance Improvements

Expand Down
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 a46ca7d

Please sign in to comment.