added a test case for the invalid symbol replacement
This commit is contained in:
parent
8585203c0a
commit
0e5454ae5d
BIN
services/registration/vise-asm
Executable file
BIN
services/registration/vise-asm
Executable file
Binary file not shown.
@ -61,13 +61,14 @@ func TestProcessVouchers(t *testing.T) {
|
||||
holdings := []dataserviceapi.TokenHoldings{
|
||||
{TokenAddress: "0xd4c288865Ce", TokenSymbol: "SRF", TokenDecimals: "6", Balance: "100000000"},
|
||||
{TokenAddress: "0x41c188d63Qa", TokenSymbol: "MILO", TokenDecimals: "4", Balance: "200000000"},
|
||||
{TokenAddress: "0x41c143d63Qa", TokenSymbol: "USD₮", TokenDecimals: "6", Balance: "300000000"},
|
||||
}
|
||||
|
||||
expectedResult := VoucherMetadata{
|
||||
Symbols: "1:SRF\n2:MILO",
|
||||
Balances: "1:100\n2:20000",
|
||||
Decimals: "1:6\n2:4",
|
||||
Addresses: "1:0xd4c288865Ce\n2:0x41c188d63Qa",
|
||||
Symbols: "1:SRF\n2:MILO\n3:USDT",
|
||||
Balances: "1:100\n2:20000\n3:300",
|
||||
Decimals: "1:6\n2:4\n3:6",
|
||||
Addresses: "1:0xd4c288865Ce\n2:0x41c188d63Qa\n3:0x41c143d63Qa",
|
||||
}
|
||||
|
||||
result := ProcessVouchers(holdings)
|
||||
|
Loading…
Reference in New Issue
Block a user