fix: HandleCommunityTokensMetadata
Add all tokens in the loop. Get MaxSupply instead of TotalSupply Issue #12104
This commit is contained in:
parent
176bdd297d
commit
f2464cccfd
|
@ -4712,7 +4712,6 @@ func (m *Manager) HandleCommunityTokensMetadata(community *Community) error {
|
||||||
if len(communityTokens) == 0 {
|
if len(communityTokens) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tokenMetadata := range communityTokens {
|
for _, tokenMetadata := range communityTokens {
|
||||||
for chainID, address := range tokenMetadata.ContractAddresses {
|
for chainID, address := range tokenMetadata.ContractAddresses {
|
||||||
exists, err := m.persistence.HasCommunityToken(communityID, address, int(chainID))
|
exists, err := m.persistence.HasCommunityToken(communityID, address, int(chainID))
|
||||||
|
@ -4726,7 +4725,10 @@ func (m *Manager) HandleCommunityTokensMetadata(community *Community) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return m.persistence.AddCommunityToken(communityToken)
|
err = m.persistence.AddCommunityToken(communityToken)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ func (m *Manager) GetCollectibleContractData(chainID uint64, contractAddress str
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
totalSupply, err := contract.TotalSupply(callOpts)
|
totalSupply, err := contract.MaxSupply(callOpts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ func (m *Manager) GetAssetContractData(chainID uint64, contractAddress string) (
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
totalSupply, err := contract.TotalSupply(callOpts)
|
totalSupply, err := contract.MaxSupply(callOpts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue