Skip to content

Commit

Permalink
Fix client from network
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Rey committed Jul 26, 2024
1 parent 3de96e5 commit 45dc6c4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/massa-react/hooks/useWriteSmartContract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
JsonRPCClient,
Mas,
MAX_GAS_CALL,
NETWORKS,
Operation,
OperationStatus,
} from '@massalabs/massa-web3';
Expand Down Expand Up @@ -89,11 +88,11 @@ export function useWriteSmartContract(
async function clientFromNetwork() {
const network = await provider.getNetwork();
switch (network) {
case NETWORKS.buildnet:
case 'buildnet':
return JsonRPCClient.buildnet();
case NETWORKS.mainnet:
case 'mainnet':
return JsonRPCClient.mainnet();
case NETWORKS.testnet:
case 'testnet':
return JsonRPCClient.testnet();
default:
throw new Error('Unsupported network');
Expand Down

0 comments on commit 45dc6c4

Please sign in to comment.