aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-18 00:45:35 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-18 00:45:35 +0800
commitcca17f70b83d42205b58af9a430fa9c98334bb47 (patch)
tree578e163765aa260bc51d14eeae8e77a0db3f49cc /packages
parentb8e69718a1fc12f1604115c9a32aff72a617fd73 (diff)
downloaddexon-0x-contracts-cca17f70b83d42205b58af9a430fa9c98334bb47.tar
dexon-0x-contracts-cca17f70b83d42205b58af9a430fa9c98334bb47.tar.gz
dexon-0x-contracts-cca17f70b83d42205b58af9a430fa9c98334bb47.tar.bz2
dexon-0x-contracts-cca17f70b83d42205b58af9a430fa9c98334bb47.tar.lz
dexon-0x-contracts-cca17f70b83d42205b58af9a430fa9c98334bb47.tar.xz
dexon-0x-contracts-cca17f70b83d42205b58af9a430fa9c98334bb47.tar.zst
dexon-0x-contracts-cca17f70b83d42205b58af9a430fa9c98334bb47.zip
Use allowance instead of approval for all in fill-scenarios
Diffstat (limited to 'packages')
-rw-r--r--packages/fill-scenarios/src/fill_scenarios.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/fill-scenarios/src/fill_scenarios.ts b/packages/fill-scenarios/src/fill_scenarios.ts
index afe42fe32..8294657e7 100644
--- a/packages/fill-scenarios/src/fill_scenarios.ts
+++ b/packages/fill-scenarios/src/fill_scenarios.ts
@@ -212,17 +212,20 @@ export class FillScenarios {
tokenId: BigNumber,
): Promise<void> {
await this._increaseERC721BalanceAsync(tokenAddress, address, tokenId);
- await this._increaseERC721AllowanceAsync(tokenAddress, address);
+ await this._increaseERC721AllowanceAsync(tokenAddress, address, tokenId);
}
- private async _increaseERC721AllowanceAsync(tokenAddress: string, address: string): Promise<void> {
+ private async _increaseERC721AllowanceAsync(
+ tokenAddress: string,
+ address: string,
+ tokenId: BigNumber,
+ ): Promise<void> {
const erc721Token = new DummyERC721TokenContract(
artifacts.DummyERC721Token.compilerOutput.abi,
tokenAddress,
this._web3Wrapper.getProvider(),
this._web3Wrapper.getContractDefaults(),
);
- const isApproved = true;
- const txHash = await erc721Token.setApprovalForAll.sendTransactionAsync(this._erc721ProxyAddress, isApproved, {
+ const txHash = await erc721Token.approve.sendTransactionAsync(this._erc721ProxyAddress, tokenId, {
from: address,
});
await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);