Skip to content

Commit

Permalink
Add a few missing boundary types
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowfiend committed Mar 29, 2022
1 parent 957aa9e commit 0f70acc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion provider-bridge-shared/eip-1193.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class EIP1193Error extends Error {
super(eip1193Error.message)
}

toJSON() {
toJSON(): unknown {
return this.eip1193Error
}
}
Expand Down
2 changes: 1 addition & 1 deletion provider-bridge-shared/runtime-typechecks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
TallyAccountPayload,
} from "./types"

export function getType(arg: unknown) {
export function getType(arg: unknown): string {
return Object.prototype.toString.call(arg).slice("[object ".length, -1)
}

Expand Down
4 changes: 2 additions & 2 deletions window-provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class TallyWindowProvider extends EventEmitter {
}

// deprecated EIP-1193 method
async enable() {
async enable(): Promise<unknown> {
return this.request({ method: "eth_requestAccounts" })
}

Expand Down Expand Up @@ -207,7 +207,7 @@ export default class TallyWindowProvider extends EventEmitter {
})
}

handleAddressChange(address: Array<string>) {
handleAddressChange(address: Array<string>): void {
if (this.selectedAddress !== address[0]) {
// eslint-disable-next-line prefer-destructuring
this.selectedAddress = address[0]
Expand Down

0 comments on commit 0f70acc

Please sign in to comment.