Skip to content

Commit

Permalink
Fix typo getSigneroken to getSignerToken (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanchchch authored Apr 27, 2022
1 parent 45a9064 commit 0f2d271
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ethers.decorators.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Inject } from '@nestjs/common'
import { getContractToken, getEthersToken, getSigneroken } from './ethers.utils'
import { getContractToken, getEthersToken, getSignerToken } from './ethers.utils'

export const InjectEthersProvider = (token?: string) => {
return Inject(getEthersToken(token))
Expand All @@ -10,5 +10,5 @@ export const InjectContractProvider = (token?: string) => {
}

export const InjectSignerProvider = (token?: string) => {
return Inject(getSigneroken(token))
return Inject(getSignerToken(token))
}
4 changes: 2 additions & 2 deletions src/ethers.providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ETHERS_MODULE_OPTIONS, MAINNET_NETWORK, BINANCE_NETWORK, BINANCE_TESTNE
import { EthersContract } from './ethers.contract'
import { EthersModuleOptions, EthersModuleAsyncOptions } from './ethers.interface'
import { EthersSigner } from './ethers.signer'
import { getEthersToken, getContractToken, getSigneroken } from './ethers.utils'
import { getEthersToken, getContractToken, getSignerToken } from './ethers.utils'

function validateBscNetwork(network: Networkish) {
if (typeof network === 'number') {
Expand Down Expand Up @@ -187,7 +187,7 @@ export function createContractProvider(token?: string): Provider {

export function createSignerProvider(token?: string): Provider {
return {
provide: getSigneroken(token),
provide: getSignerToken(token),
useFactory: async (provider: AbstractProvider): Promise<EthersSigner> => {
return await lastValueFrom(defer(async () => new EthersSigner(provider)))
},
Expand Down
2 changes: 1 addition & 1 deletion src/ethers.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export function getContractToken(token?: string): string {
return `${DECORATED_PREFIX}:Contract:${token || DEFAULT_TOKEN}`
}

export function getSigneroken(token?: string): string {
export function getSignerToken(token?: string): string {
return `${DECORATED_PREFIX}:Signer:${token || DEFAULT_TOKEN}`
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export {
BINANCE_NETWORK,
BINANCE_TESTNET_NETWORK,
} from './ethers.constants'
export { getEthersToken, getContractToken, getSigneroken } from './ethers.utils'
export { getEthersToken, getContractToken, getSignerToken } from './ethers.utils'
export { EthersSigner } from './ethers.signer'
export { EthersContract } from './ethers.contract'
export * from '@ethersproject/abi'
Expand Down

0 comments on commit 0f2d271

Please sign in to comment.