Skip to content

Commit

Permalink
rename tu internal rovider
Browse files Browse the repository at this point in the history
  • Loading branch information
karczuRF committed Nov 20, 2024
1 parent 6a924e8 commit 05c17aa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export type WindowSize = {
height: number
}

export class TariUniverseProvider implements TariProvider {
public providerName = "TariUniverseProvider"
export class TUInternalProvider implements TariProvider {
public providerName = "TUInternalProvider"
params: WalletDaemonParameters
client: WalletDaemonClient
isProviderConnected: boolean
Expand All @@ -63,9 +63,9 @@ export class TariUniverseProvider implements TariProvider {
return this.client
}

static build(params: WalletDaemonParameters): TariUniverseProvider {
static build(params: WalletDaemonParameters): TUInternalProvider {
const client = WalletDaemonClient.new(new IPCRpcTransport())
return new TariUniverseProvider(params, client)
return new TUInternalProvider(params, client)
}

public setWindowSize(width: number, height: number): void {
Expand Down
4 changes: 2 additions & 2 deletions src/store/provider/provider.selector.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TariPermissions } from "@tari-project/tarijs"
import { createSelector } from "@reduxjs/toolkit"
import { RootState } from "../store"
import { WalletDaemonParameters, TariUniverseProvider } from "@provider/TariUniverseProvider"
import { WalletDaemonParameters, TUInternalProvider } from "@provider/TUInternalProvider"
import { toPermission } from "@type/tariPermissions"

const providerStateSelector = (state: RootState) => state.provider
Expand All @@ -19,7 +19,7 @@ const selectProvider = createSelector([providerStateSelector], (state) => {
permissions,
optionalPermissions,
}
return TariUniverseProvider.build(params)
return TUInternalProvider.build(params)
})

export const providerSelector = {
Expand Down
6 changes: 3 additions & 3 deletions src/store/provider/provider.types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { TariUniverseProvider } from "@provider/TariUniverseProvider"
import { TUInternalProvider } from "@provider/TUInternalProvider"
import { TariPermission } from "@tari-project/tarijs/dist/providers/tari_universe"

export type ProviderStoreState = {
isInitialized: boolean
provider: TariUniverseProvider | null
provider: TUInternalProvider | null
permissions: TariPermission[]
}

Expand All @@ -12,7 +12,7 @@ export type InitProviderFailurePayload = {
errorMsg: string
}
export type InitProviderSuccessPayload = {
provider: TariUniverseProvider
provider: TUInternalProvider
}

export type UpdatePermissionsRequestPayload = {
Expand Down
4 changes: 2 additions & 2 deletions src/store/transaction/transaction.types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { TariUniverseProvider } from "@provider/TariUniverseProvider"
import { TUInternalProvider } from "@provider/TUInternalProvider"
import { BalanceUpdate } from "../simulation/simulation.types"
import { SubmitTransactionRequest } from "@tari-project/tarijs"

export type TransactionStatus = "pending" | "success" | "failure" | "cancelled"
export type TUProviderMethod = Exclude<keyof TariUniverseProvider, "runOne">
export type TUProviderMethod = Exclude<keyof TUInternalProvider, "runOne">

export type Transaction = {
methodName: TUProviderMethod
Expand Down
4 changes: 2 additions & 2 deletions src/types/transaction.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TariUniverseProvider } from "@provider/TariUniverseProvider"
import { TUInternalProvider } from "@provider/TUInternalProvider"

export type TransactionEvent = {
methodName: Exclude<keyof TariUniverseProvider, "runOne">
methodName: Exclude<keyof TUInternalProvider, "runOne">
args: any[]
id: number
}

0 comments on commit 05c17aa

Please sign in to comment.