Skip to content

Commit

Permalink
Fix: same asset type
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky authored and m-kus committed Mar 18, 2021
1 parent a878312 commit 8ae3de4
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 103 deletions.
8 changes: 0 additions & 8 deletions internal/handlers/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ func (ledger *Ledger) getResultModels(bmd *bigmapdiff.BigMapDiff, bigMapType *as
if len(balance) == 0 {
return nil, nil
}
if balance[0].IsNFT {
if err := ledger.tokenBalances.BurnNft(bmd.Network, bmd.Address, balance[0].TokenID); err != nil {
return nil, err
}
if balance[0].Address == "" { // Burn NFT token
return nil, nil
}
}

tb := &tbModel.TokenBalance{
Network: bmd.Network,
Expand Down
1 change: 0 additions & 1 deletion internal/parsers/tokenbalance/nft_asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func (p NftAsset) Parse(data []byte) ([]TokenBalance, error) {
Value: balance,
Address: address,
TokenID: tokenID.Int64(),
IsNFT: true,
})
return false, nil
})
Expand Down
88 changes: 0 additions & 88 deletions internal/parsers/tokenbalance/nft_single_asset.go

This file was deleted.

3 changes: 0 additions & 3 deletions internal/parsers/tokenbalance/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var parsersEvents = map[string][]Parser{
},
NftAssetBalanceUpdates: {
NewNftAssetOption(),
NewNftSingleAssetOption(),
},
}

Expand All @@ -37,7 +36,6 @@ var parsersBigMap = map[string][]Parser{
},
NftAssetBalanceUpdates: {
NewNftAsset(),
NewNftSingleAsset(),
},
}

Expand All @@ -52,7 +50,6 @@ type TokenBalance struct {
Address string
TokenID int64
Value *big.Int
IsNFT bool
}

// GetParserForEvents -
Expand Down
3 changes: 0 additions & 3 deletions internal/parsers/tokenbalance/parsers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ func Test_nftParser_Parse(t *testing.T) {
Address: "KT1BYYLfMjufYwqFtTSYJND7bzKNyK7mjrjM",
TokenID: 1,
Value: newBigIntFromString("1"),
IsNFT: true,
},
},
},
Expand Down Expand Up @@ -136,7 +135,6 @@ func Test_nftOptionParser_Parse(t *testing.T) {
Address: "KT1BYYLfMjufYwqFtTSYJND7bzKNyK7mjrjM",
TokenID: 1,
Value: newBigIntFromString("1"),
IsNFT: true,
},
},
}, {
Expand All @@ -147,7 +145,6 @@ func Test_nftOptionParser_Parse(t *testing.T) {
Address: "",
TokenID: 1,
Value: newBigIntFromString("0"),
IsNFT: true,
},
},
},
Expand Down

0 comments on commit 8ae3de4

Please sign in to comment.