Stop exporting assertions from order-utils

This commit is contained in:
Leonid Logvinov
2018-05-02 18:38:38 +03:00
parent adaff92c92
commit a6046af024
11 changed files with 40 additions and 17 deletions

View File

@@ -12,10 +12,6 @@ import { isValidSignature } from './signature_utils';
export const assert = {
...sharedAssert,
isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string) {
const isValid = isValidSignature(orderHash, ecSignature, signerAddress);
this.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`);
},
async isSenderAddressAsync(
variableName: string,
senderAddressHex: string,
@@ -28,8 +24,4 @@ export const assert = {
`Specified ${variableName} ${senderAddressHex} isn't available through the supplied web3 provider`,
);
},
async isUserAddressAvailableAsync(web3Wrapper: Web3Wrapper): Promise<void> {
const availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
this.assert(!_.isEmpty(availableAddresses), 'No addresses were available on the provided web3 provider');
},
};