diff options
Diffstat (limited to 'packages/contracts/src/utils/asset_wrapper.ts')
-rw-r--r-- | packages/contracts/src/utils/asset_wrapper.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/contracts/src/utils/asset_wrapper.ts b/packages/contracts/src/utils/asset_wrapper.ts index f86c0bc23..11697eca8 100644 --- a/packages/contracts/src/utils/asset_wrapper.ts +++ b/packages/contracts/src/utils/asset_wrapper.ts @@ -87,6 +87,11 @@ export class AssetWrapper { // Burn token await erc721Wrapper.burnAsync(assetProxyData.tokenAddress, assetProxyData.tokenId, userAddress); return; + } else if ( + (userAddress !== tokenOwner && desiredBalance.eq(0)) || + (tokenOwner === userAddress && desiredBalance.eq(1)) + ) { + return; // noop } break; } @@ -176,6 +181,11 @@ export class AssetWrapper { assetProxyData.tokenAddress, assetProxyData.tokenId, ); + } else if ( + (!isProxyApproved && desiredAllowance.eq(0)) || + (isProxyApproved && desiredAllowance.eq(1)) + ) { + return; // noop } break; |