Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2051 from OpenBazaar/brian.fix-migration
Browse files Browse the repository at this point in the history
Update the API URL for infura
  • Loading branch information
cpacia committed Apr 14, 2020
2 parents 998d61e + 5379179 commit ce1c135
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions repo/migrations/Migration031.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (am01) Up(repoPath, dbPassword string, testnet bool) error {
return errors.New("invalid config: invalid ETH Wallet")
}

ethWalletCfg["API"] = []string{"https://mainnet.infura.io"}
ethWalletCfg["APIPool"] = []string{"https://mainnet.infura.io"}
ethWalletCfg["APITestnetPool"] = []string{"https://rinkeby.infura.io"}
ethWalletCfg["WalletOptions"] = map[string]interface{}{
Expand Down
4 changes: 4 additions & 0 deletions repo/migrations/Migration031_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ const postAM01Config = `{
]
},
"ETH": {
"API": [
"https://mainnet.infura.io"
],
"APIPool": [
"https://mainnet.infura.io"
],
Expand Down Expand Up @@ -166,6 +169,7 @@ func TestAM01(t *testing.T) {
w := config["Wallets"].(map[string]interface{})
eth := w["ETH"].(map[string]interface{})

AM01AssertAPI(t, eth["API"], "https://mainnet.infura.io")
AM01AssertAPI(t, eth["APIPool"], "https://mainnet.infura.io")
AM01AssertAPI(t, eth["APITestnetPool"], "https://rinkeby.infura.io")

Expand Down

0 comments on commit ce1c135

Please sign in to comment.