Skip to content

Commit

Permalink
TD1453 fix type issue (#1830)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdymalla authored May 28, 2024
1 parent 2b0f2db commit b5c1124
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/checkout/sdk/src/smartCheckout/sell/sell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,7 @@ export const sell = async (
let tokenQuantity = BigNumber.from(1);

// if type exists in sellToken then it is valid ERC721 or ERC1155 and not deprecated type
if ('type' in sellToken) {
const erc1155Token = sellToken as unknown as ERC1155Item | ERC721Item;
if (erc1155Token.type === ItemType.ERC1155) tokenQuantity = BigNumber.from(erc1155Token.amount);
}
if (sellTokenHasType && sellToken.type === ItemType.ERC1155) tokenQuantity = BigNumber.from(sellToken.amount);

const orderBookFees = calculateFees(makerFees, buyTokenOrNative.amount, decimals, tokenQuantity);
if (orderBookFees.length !== makerFees.length) {
Expand Down

0 comments on commit b5c1124

Please sign in to comment.