Skip to content

Commit 6ef7e41

Browse files
committed
tested and ammended read-from smart contract ans sign transcation to prevent failures
1 parent 1ae32d0 commit 6ef7e41

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

components/overledger/actions/prepare-smart-contract-transaction/prepare-smart-contract-transaction.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
signingAccountId: {
2929
type: "string",
3030
label: "Signing Account ID",
31-
description: "The blockchain account (address) that you will be sending this transaction",
31+
description: "The blockchain account ID/address that will be sending this transaction",
3232
},
3333
smartContractId: {
3434
type: "string",

components/overledger/actions/read-from-a-smart-contract/read-from-a-smart-contract.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ export default {
3232
},
3333
inputParameters: {
3434
type: "string[]",
35-
label: "Input Parameters - Stringified Objects",
36-
description: "The input parameters for the smart contract function, in JSON string format. Example: `['{\"type\":\"string\",\"value\":\"param1\"}', '{\"type\":\"uint256\",\"value\":\"param2\"}']`",
35+
label: "Input Parameters",
36+
description: "The input parameters for the smart contract function, provide both type and value in object format. Example: {\"type\":\"uint256\",\"value\":\"5\"} or {\"type\":\"address\",\"value\":\"0x3....ed8\"}",
3737
optional: true,
38+
default: [],
3839
},
3940
smartContractId: {
4041
type: "string",
@@ -44,7 +45,9 @@ export default {
4445
outputParameters: {
4546
type: "string[]",
4647
label: "Output Parameters",
47-
description: "The type of output parameter required e.g., address, string",
48+
description: "Each output parameter expected, provide just the type in object format. Example - 1) function returns one uint256 value: {\"type\": \"uint256\"} or 2) function returns two address values: {\"type\": \"address\"},{\"type\": \"address\"}",
49+
optional: true,
50+
default: [],
4851
},
4952
},
5053
async additionalProps() {

components/overledger/actions/sign-a-transaction/sign-a-transaction.mjs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import overledger from "../../overledger.app.mjs";
2-
import { UNIT_OPTIONS } from "../../common/constants.mjs";
2+
import { TECHNOLOGY_OPTIONS, UNIT_OPTIONS } from "../../common/constants.mjs";
33

44
export default {
55
key: "overledger-sign-a-transaction",
66
name: "Sign a transaction",
7-
description: "Sign a transaction using Overledger",
7+
description: "Sign a transaction using Overledger - Part 2 of [Overledger Pattern](https://developers.quant.network/reference/overledger-pattern). [See documentation](https://developers.quant.network/reference/sandboxsigning)",
88
version: "0.0.1",
99
type: "action",
1010
props: {
@@ -19,16 +19,18 @@ export default {
1919
type: "string",
2020
label: "Location Technology",
2121
description: "The blockchain technology used for this transaction, e.g., ethereum, substrate - required in order to set the dltfee",
22+
options: TECHNOLOGY_OPTIONS,
23+
reloadProps: true,
2224
},
2325
keyId: {
2426
type: "string",
2527
label: "Signing Account ID",
26-
description: "The blockchain account that will sign the transaction.",
28+
description: "The ID/address of the blockchain account that will sign the transaction.",
2729
},
2830
requestId: {
2931
type: "string",
30-
label: "requestId",
31-
description: "The ID assigned to a preparation request in Overledger. This should be set to the requestId parameter found in the response object of the 'Prepare Smart Contract Transaction' Overledger action.",
32+
label: "Request ID",
33+
description: "The Request ID assigned to a preparation request in Overledger. This should be set to the requestId parameter found in the response object of the 'Prepare Transaction' Overledger action.",
3234
},
3335
transactionSigningResponderName: {
3436
type: "string",
@@ -38,7 +40,7 @@ export default {
3840
nativeData: {
3941
type: "object",
4042
label: "Native Data",
41-
description: "A JSON object representing the transaction required to be signed.",
43+
description: "An object representing the transaction required to be signed - This should be set to the nativeData object of the 'Prepare Transaction' Overledger action.",
4244
},
4345
},
4446
async run({ $ }) {

0 commit comments

Comments
 (0)