Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Add test cases to TestGetWalletRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
foxytanuki committed Jan 11, 2024
1 parent 3c8d894 commit d0419f2
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions x/registry/types/second_level_domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,41 @@ func TestGetWalletRecord(t *testing.T) {
fn func()
}{
// BITCOIN
{desc: "Bitcoin Mainnet", walletRecordType: "BITCOIN_MAINNET_MAINNET", resp: "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2", fn: func() {
{desc: "Bitcoin Default", walletRecordType: "BITCOIN_MAINNET_MAINNET", resp: "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2", fn: func() {
err := domain.UpdateWalletRecord("BITCOIN_DEFAULT_DEFAULT", "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2")
require.Nil(t, err)
}},
{desc: "Bitcoin Mainnet", walletRecordType: "BITCOIN_MAINNET_MAINNET", resp: "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2", fn: func() {
err := domain.UpdateWalletRecord("BITCOIN_MAINNET_MAINNET", "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2")
require.Nil(t, err)
}},
// EVM
{desc: "Ethereum Mainnet", walletRecordType: "ETHEREUM_MAINNET_MAINNET", resp: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", fn: func() {
{desc: "Ethereum Default", walletRecordType: "ETHEREUM_MAINNET_MAINNET", resp: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", fn: func() {
err := domain.UpdateWalletRecord("EVM_DEFAULT_DEFAULT", "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266")
require.Nil(t, err)
}},
{desc: "Ethereum Mainnet", walletRecordType: "ETHEREUM_MAINNET_MAINNET", resp: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", fn: func() {
err := domain.UpdateWalletRecord("ETHEREUM_MAINNET_MAINNET", "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266")
require.Nil(t, err)
}},
// MOVE
{desc: "Aptos Mainnet", walletRecordType: "APTOS_MAINNET_MAINNET", resp: "0xeeff357ea5c1a4e7bc11b2b17ff2dc2dcca69750bfef1e1ebcaccf8c8018175b", fn: func() {
{desc: "Aptos Default", walletRecordType: "APTOS_MAINNET_MAINNET", resp: "0xeeff357ea5c1a4e7bc11b2b17ff2dc2dcca69750bfef1e1ebcaccf8c8018175b", fn: func() {
err := domain.UpdateWalletRecord("MOVE_DEFAULT_DEFAULT", "0xeeff357ea5c1a4e7bc11b2b17ff2dc2dcca69750bfef1e1ebcaccf8c8018175b")
require.Nil(t, err)
}},
{desc: "Aptos Mainnet", walletRecordType: "APTOS_MAINNET_MAINNET", resp: "0xeeff357ea5c1a4e7bc11b2b17ff2dc2dcca69750bfef1e1ebcaccf8c8018175b", fn: func() {
err := domain.UpdateWalletRecord("APTOS_MAINNET_MAINNET", "0xeeff357ea5c1a4e7bc11b2b17ff2dc2dcca69750bfef1e1ebcaccf8c8018175b")
require.Nil(t, err)
}},
// SOLANA
{desc: "Solana Mainnet", walletRecordType: "SOLANA_MAINNET_MAINNET", resp: "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH", fn: func() {
{desc: "Solana Default", walletRecordType: "SOLANA_MAINNET_MAINNET", resp: "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH", fn: func() {
err := domain.UpdateWalletRecord("SOLANA_DEFAULT_DEFAULT", "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH")
require.Nil(t, err)
}},
{desc: "Solana Mainnet", walletRecordType: "SOLANA_MAINNET_MAINNET", resp: "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH", fn: func() {
err := domain.UpdateWalletRecord("SOLANA_MAINNET_MAINNET", "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH")
require.Nil(t, err)
}},
}

for _, tc := range testCases {
Expand Down

0 comments on commit d0419f2

Please sign in to comment.