Skip to content

Commit

Permalink
fix polygon asset validation
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricfung committed Dec 7, 2022
1 parent a4df3c0 commit 24b1411
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion domains/polygon/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func GenerateAssetId(assetKey string) crypto.Hash {
panic(assetKey)
}

if assetKey == "0x0000000000000000000000000000000000001010" {
if assetKey == "0x0000000000000000000000000000000000000000" {
return PolygonChainId
}

Expand Down
2 changes: 1 addition & 1 deletion domains/polygon/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ func TestValidation(t *testing.T) {

assert.Equal(crypto.NewHash([]byte("9189a528-c3a5-36cb-8e08-feb81e7cb9cb")), GenerateAssetId(tusd))
assert.Equal(crypto.NewHash([]byte("80b65786-7c75-3523-bc03-fb25378eae41")), GenerateAssetId(usdc))
assert.Equal(crypto.NewHash([]byte("b7938396-3f94-4e0a-9179-d3440718156f")), GenerateAssetId("0x0000000000000000000000000000000000001010"))
assert.Equal(crypto.NewHash([]byte("b7938396-3f94-4e0a-9179-d3440718156f")), GenerateAssetId("0x0000000000000000000000000000000000000000"))
assert.Equal(crypto.NewHash([]byte("b7938396-3f94-4e0a-9179-d3440718156f")), PolygonChainId)
}

0 comments on commit 24b1411

Please sign in to comment.