()
| 102 | * @returns Currently connected network |
| 103 | */ |
| 104 | export const getCurrentConnectedNetwork = async (): Promise<ethers.providers.Network> => { |
| 105 | |
| 106 | // --- Unfortunate check we must do --- |
| 107 | if (ethersProvider === null) return { name: "", chainId: -1 }; |
| 108 | |
| 109 | const network = await ethersProvider.getNetwork(); |
| 110 | return network; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Returns the current balance of the given Eth account to the user. |
nothing calls this directly
no outgoing calls
no test coverage detected