@algorandfoundation/algokit-utils 8.0.2 → 8.0.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/testing/test-logger.js +7 -5
- package/testing/test-logger.js.map +1 -1
- package/testing/test-logger.mjs +7 -5
- package/testing/test-logger.mjs.map +1 -1
- package/transaction/transaction.js +2 -2
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +3 -3
- package/transaction/transaction.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.js +8 -1
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +8 -1
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/app-client.d.ts +0 -2
- package/types/app-client.js +3 -3
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +4 -4
- package/types/app-client.mjs.map +1 -1
- package/types/app-manager.d.ts +2 -2
- package/types/app-manager.js +2 -1
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +2 -1
- package/types/app-manager.mjs.map +1 -1
- package/types/composer.js +2 -1
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +2 -1
- package/types/composer.mjs.map +1 -1
- package/types/dispenser-client.js +3 -1
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +3 -1
- package/types/dispenser-client.mjs.map +1 -1
- package/util.d.ts +2 -0
- package/util.js +16 -0
- package/util.js.map +1 -1
- package/util.mjs +15 -1
- package/util.mjs.map +1 -1
package/types/app-client.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { replaceDeployTimeControlParams, performTemplateSubstitution, deployApp,
|
|
|
5
5
|
import { Config } from '../config.mjs';
|
|
6
6
|
import { legacySendTransactionBridge } from '../transaction/legacy-bridge.mjs';
|
|
7
7
|
import { getSenderAddress, encodeTransactionNote } from '../transaction/transaction.mjs';
|
|
8
|
-
import { binaryStartsWith } from '../util.mjs';
|
|
8
|
+
import { asJson, binaryStartsWith } from '../util.mjs';
|
|
9
9
|
import { UPDATABLE_TEMPLATE_NAME, DELETABLE_TEMPLATE_NAME } from './app.mjs';
|
|
10
10
|
import { getArc56Method, getArc56ReturnValue, getABITupleFromABIStruct, getABIDecodedValue, getABIEncodedValue } from './app-arc56.mjs';
|
|
11
11
|
import { arc32ToArc56 } from './app-spec.mjs';
|
|
@@ -180,7 +180,7 @@ class AppClient {
|
|
|
180
180
|
const availableAppSpecNetworks = Object.keys(appSpec.networks ?? {});
|
|
181
181
|
const networkIndex = availableAppSpecNetworks.findIndex((n) => networkNames.includes(n));
|
|
182
182
|
if (networkIndex === -1) {
|
|
183
|
-
throw new Error(`No app ID found for network ${
|
|
183
|
+
throw new Error(`No app ID found for network ${asJson(networkNames)} in the app spec`);
|
|
184
184
|
}
|
|
185
185
|
const appId = BigInt(appSpec.networks[networkIndex].appID);
|
|
186
186
|
return new AppClient({ ...params, appId, appSpec });
|
|
@@ -472,8 +472,8 @@ class AppClient {
|
|
|
472
472
|
.split('\n'), getLineForPc);
|
|
473
473
|
}
|
|
474
474
|
if (errorMessage) {
|
|
475
|
-
const appId =
|
|
476
|
-
const txId =
|
|
475
|
+
const appId = asJson(e).match(/(?<=app=)\d+/)?.[0] || '';
|
|
476
|
+
const txId = asJson(e).match(/(?<=transaction )\S+(?=:)/)?.[0];
|
|
477
477
|
const error = new Error(`Runtime error when executing ${appSpec.name} (appId: ${appId}) in transaction ${txId}: ${errorMessage}`);
|
|
478
478
|
error.cause = e;
|
|
479
479
|
return error;
|