From df4a5a768997c1f8094dd4ce06fa5c881261ca3a Mon Sep 17 00:00:00 2001 From: M-Picco Date: Mon, 18 Apr 2022 11:25:15 -0300 Subject: [PATCH] Update algod node endpoints to new algoexplorer api endpoints --- docs/getting-started/choosing-network.md | 2 +- docs/getting-started/quick-start.md | 4 ++-- src/components/ASATransactionExample.tsx | 4 ++-- src/components/ApplCloseOutExample.tsx | 4 ++-- src/components/ApplCreateTransactionExample.tsx | 4 ++-- src/components/ApplDeleteTransactionExample.tsx | 4 ++-- src/components/ApplOptInExample.tsx | 4 ++-- src/components/ApplUpdateTransactionExample.tsx | 4 ++-- src/components/GroupPaymentExample.tsx | 4 ++-- src/components/GroupedPaymentExample.tsx | 4 ++-- src/components/PaymentTransactionExample.tsx | 4 ++-- src/components/PaymentTransactionOverrideSignerExample.tsx | 4 ++-- src/components/PaymentWithTealExample.tsx | 2 +- src/components/homepage/SendTransaction.tsx | 2 +- src/context/preLoadedData.tsx | 2 +- src/utils/connections.ts | 2 +- 16 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/getting-started/choosing-network.md b/docs/getting-started/choosing-network.md index cbcdbef..c862076 100644 --- a/docs/getting-started/choosing-network.md +++ b/docs/getting-started/choosing-network.md @@ -15,7 +15,7 @@ Follow this example to create a transaction choosing the Testnet network and sen import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); diff --git a/docs/getting-started/quick-start.md b/docs/getting-started/quick-start.md index 6da45b5..d098aff 100644 --- a/docs/getting-started/quick-start.md +++ b/docs/getting-started/quick-start.md @@ -46,7 +46,7 @@ There are two options to create transactions accepted by MyAlgo Connect: ```jsx import algosdk from "algosdk"; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); @@ -75,7 +75,7 @@ After the user has signed the transaction(s), the object signedTxn should have t ```jsx import algosdk from "algosdk"; -const algodClient = new algosdk.Algodv2(“”, 'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2(“”, 'https://node.testnet.algoexplorerapi.io', ''); const response = await algodClient.sendRawTransaction(signedTxn.blob).do(); ``` diff --git a/src/components/ASATransactionExample.tsx b/src/components/ASATransactionExample.tsx index 09074b5..684f0e7 100644 --- a/src/components/ASATransactionExample.tsx +++ b/src/components/ASATransactionExample.tsx @@ -15,7 +15,7 @@ const algoSdkCode = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makeAssetTransferTxnWithSuggestedParamsFromObject({ @@ -37,7 +37,7 @@ const anotherAlternativeCode = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = { diff --git a/src/components/ApplCloseOutExample.tsx b/src/components/ApplCloseOutExample.tsx index f068817..cf8e333 100644 --- a/src/components/ApplCloseOutExample.tsx +++ b/src/components/ApplCloseOutExample.tsx @@ -14,7 +14,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn : any = { @@ -34,7 +34,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makeApplicationCloseOutTxnFromObject({ diff --git a/src/components/ApplCreateTransactionExample.tsx b/src/components/ApplCreateTransactionExample.tsx index b371f1f..982ce9e 100644 --- a/src/components/ApplCreateTransactionExample.tsx +++ b/src/components/ApplCreateTransactionExample.tsx @@ -12,7 +12,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = { @@ -36,7 +36,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makeApplicationCreateTxnFromObject({ diff --git a/src/components/ApplDeleteTransactionExample.tsx b/src/components/ApplDeleteTransactionExample.tsx index 3e14c62..6c681d0 100644 --- a/src/components/ApplDeleteTransactionExample.tsx +++ b/src/components/ApplDeleteTransactionExample.tsx @@ -12,7 +12,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn : any = { @@ -31,7 +31,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makeApplicationDeleteTxnFromObject({ diff --git a/src/components/ApplOptInExample.tsx b/src/components/ApplOptInExample.tsx index f8fca8b..d4e0c1c 100644 --- a/src/components/ApplOptInExample.tsx +++ b/src/components/ApplOptInExample.tsx @@ -13,7 +13,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn : any = { @@ -33,7 +33,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makeApplicationOptInTxnFromObject({ diff --git a/src/components/ApplUpdateTransactionExample.tsx b/src/components/ApplUpdateTransactionExample.tsx index fc1277f..41addc3 100644 --- a/src/components/ApplUpdateTransactionExample.tsx +++ b/src/components/ApplUpdateTransactionExample.tsx @@ -11,7 +11,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = { @@ -31,7 +31,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makeApplicationUpdateTxnFromObject({ diff --git a/src/components/GroupPaymentExample.tsx b/src/components/GroupPaymentExample.tsx index 57b2d3e..965728e 100644 --- a/src/components/GroupPaymentExample.tsx +++ b/src/components/GroupPaymentExample.tsx @@ -13,7 +13,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn1: any = { @@ -44,7 +44,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject({ diff --git a/src/components/GroupedPaymentExample.tsx b/src/components/GroupedPaymentExample.tsx index d39b9d6..0c0cc60 100644 --- a/src/components/GroupedPaymentExample.tsx +++ b/src/components/GroupedPaymentExample.tsx @@ -12,7 +12,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn1: any = { @@ -43,7 +43,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject({ diff --git a/src/components/PaymentTransactionExample.tsx b/src/components/PaymentTransactionExample.tsx index b08ea08..ead0733 100644 --- a/src/components/PaymentTransactionExample.tsx +++ b/src/components/PaymentTransactionExample.tsx @@ -14,7 +14,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn: any = { @@ -34,7 +34,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({ diff --git a/src/components/PaymentTransactionOverrideSignerExample.tsx b/src/components/PaymentTransactionOverrideSignerExample.tsx index 1c16565..051d610 100644 --- a/src/components/PaymentTransactionOverrideSignerExample.tsx +++ b/src/components/PaymentTransactionOverrideSignerExample.tsx @@ -14,7 +14,7 @@ const codeV1 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn: any = { @@ -38,7 +38,7 @@ const codeV2 = ` import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({ diff --git a/src/components/PaymentWithTealExample.tsx b/src/components/PaymentWithTealExample.tsx index 72ffba4..fedc99b 100644 --- a/src/components/PaymentWithTealExample.tsx +++ b/src/components/PaymentWithTealExample.tsx @@ -14,7 +14,7 @@ const codeV2 = import algosdk from "algosdk"; import MyAlgoConnect from '@randlabs/myalgo-connect'; -const algodClient = new algosdk.Algodv2("",'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2("",'https://node.testnet.algoexplorerapi.io', ''); const params = await algodClient.getTransactionParams().do(); const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({ diff --git a/src/components/homepage/SendTransaction.tsx b/src/components/homepage/SendTransaction.tsx index 6e71132..684aab9 100644 --- a/src/components/homepage/SendTransaction.tsx +++ b/src/components/homepage/SendTransaction.tsx @@ -6,7 +6,7 @@ import PrismCode from '../commons/Code'; const code = ` import algosdk from "algosdk"; -const algodClient = new algosdk.Algodv2('', 'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2('', 'https://node.testnet.algoexplorerapi.io', ''); const response = await algodClient.sendRawTransaction(signedTxn.blob).do(); `; diff --git a/src/context/preLoadedData.tsx b/src/context/preLoadedData.tsx index 49e7f48..c1ae065 100644 --- a/src/context/preLoadedData.tsx +++ b/src/context/preLoadedData.tsx @@ -26,7 +26,7 @@ export default function PreLoadDataContextComponent(props: any): JSX.Element { //@ts-ignore setAlgosdk(x); - let client = new x.Algodv2('', 'https://api.testnet.algoexplorer.io', ''); + let client = new x.Algodv2('', 'https://node.testnet.algoexplorerapi.io', ''); //@ts-ignore setAlgoClient(client); diff --git a/src/utils/connections.ts b/src/utils/connections.ts index 36fef78..2d3c662 100644 --- a/src/utils/connections.ts +++ b/src/utils/connections.ts @@ -1,6 +1,6 @@ import algosdk from "algosdk"; -const algodClient = new algosdk.Algodv2('', 'https://api.testnet.algoexplorer.io', ''); +const algodClient = new algosdk.Algodv2('', 'https://node.testnet.algoexplorerapi.io', ''); export { algodClient