Skip to content

Commit 65f4811

Browse files
committed
fix: replace any with void
1 parent bd0f3b4 commit 65f4811

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/LowLevel/PolyToken.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import { GenericContract, AllowanceArgs, GetTokensArgs, BalanceOfArgs, ApproveAr
1010

1111
interface PolyTokenContract extends GenericContract {
1212
methods: {
13-
getTokens: (amount: BigNumber, recipient: string) => TransactionObject<boolean>;
13+
getTokens: (amount: BigNumber, recipient: string) => TransactionObject<void>;
1414
balanceOf: (address: string) => TransactionObject<string>;
1515
allowance: (tokenOwner: string, spender: string) => TransactionObject<string>;
16-
approve: (spender: string, amount: BigNumber) => TransactionObject<boolean>;
16+
approve: (spender: string, amount: BigNumber) => TransactionObject<void>;
1717
};
1818
}
1919

src/LowLevel/utils.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Web3 from 'web3';
22
import BigNumber from 'bignumber.js';
3-
import { web3 } from '../LowLevel/web3Client';
43
import { Tx, TransactionObject } from 'web3/eth/types';
4+
import { web3 } from '../LowLevel/web3Client';
55

66
const { utils } = Web3;
77

@@ -69,13 +69,12 @@ export function isAddress(value: string) {
6969
// @TODO add multiplier
7070
// @TODO add docs
7171

72-
export async function getOptions(method: TransactionObject<any>, options: Tx) {
72+
export async function getOptions(method: TransactionObject<void>, options: Tx) {
7373
const block = await web3.eth.getBlock('latest');
7474
const networkGasLimit = block.gasLimit;
7575
options.gasPrice = options.gasPrice || (await web3.eth.getGasPrice());
7676
if (options.from) {
77-
options.nonce =
78-
options.nonce || (await web3.eth.getTransactionCount(options.from));
77+
options.nonce = options.nonce || (await web3.eth.getTransactionCount(options.from));
7978
}
8079
if (!options.gas) {
8180
const gasLimit = Math.floor((await method.estimateGas(options)) * 1.2);

0 commit comments

Comments
 (0)