Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Remove partial type for TxData txDefaults
Browse files Browse the repository at this point in the history
  • Loading branch information
dekz committed Jan 21, 2019
1 parent ebbb4df commit bee48d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/migrations/CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
{
"note": "Upgrade the bignumber.js to v8.0.2",
"pr": 1517
},
{
"note": "Removed `owner` in Migrations. `txDefaults` is now a non-Partial type",
"pr": 1533
}
]
},
Expand Down
10 changes: 2 additions & 8 deletions packages/migrations/src/migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ import { erc20TokenInfo, erc721TokenInfo } from './utils/token_info';
* @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
* @returns The addresses of the contracts that were deployed.
*/
export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<ContractAddresses> {
export async function runMigrationsAsync(provider: Provider, txDefaults: TxData): Promise<ContractAddresses> {
const web3Wrapper = new Web3Wrapper(provider);
if (_.isUndefined(txDefaults.from)) {
throw new Error('from address must be specified');
}

// Proxies
const erc20Proxy = await wrappers.ERC20ProxyContract.deployFrom0xArtifactAsync(
Expand Down Expand Up @@ -206,10 +203,7 @@ let _cachedContractAddresses: ContractAddresses;
* @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
* @returns The addresses of the contracts that were deployed.
*/
export async function runMigrationsOnceAsync(
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ContractAddresses> {
export async function runMigrationsOnceAsync(provider: Provider, txDefaults: TxData): Promise<ContractAddresses> {
if (!_.isUndefined(_cachedContractAddresses)) {
return _cachedContractAddresses;
}
Expand Down

0 comments on commit bee48d1

Please sign in to comment.