fix: Fix send Erc 1155 flow (#4865)

This commit is contained in:
Khushboo-dev-cpp 2024-03-06 11:16:20 +01:00 committed by GitHub
parent 6b7efd3dd8
commit 580f697f57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -13,7 +13,6 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
ethTypes "github.com/ethereum/go-ethereum/core/types" ethTypes "github.com/ethereum/go-ethereum/core/types"
"github.com/status-im/status-go/account" "github.com/status-im/status-go/account"
"github.com/status-im/status-go/contracts/community-tokens/collectibles"
"github.com/status-im/status-go/contracts/ierc1155" "github.com/status-im/status-go/contracts/ierc1155"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
@ -59,7 +58,7 @@ func (s *ERC1155TransferBridge) EstimateGas(fromNetwork *params.Network, toNetwo
var input []byte var input []byte
value := new(big.Int) value := new(big.Int)
abi, err := abi.JSON(strings.NewReader(collectibles.CollectiblesMetaData.ABI)) abi, err := abi.JSON(strings.NewReader(ierc1155.Ierc1155ABI))
if err != nil { if err != nil {
return 0, err return 0, err
} }

View File

@ -452,7 +452,7 @@ type Router struct {
} }
func (r *Router) requireApproval(ctx context.Context, sendType SendType, bridge bridge.Bridge, account common.Address, network *params.Network, token *token.Token, amountIn *big.Int) (bool, *big.Int, uint64, *common.Address, error) { func (r *Router) requireApproval(ctx context.Context, sendType SendType, bridge bridge.Bridge, account common.Address, network *params.Network, token *token.Token, amountIn *big.Int) (bool, *big.Int, uint64, *common.Address, error) {
if sendType == ERC721Transfer { if sendType.IsCollectiblesTransfer() {
return false, nil, 0, nil, nil return false, nil, 0, nil, nil
} }