Compare commits

...
Author SHA1 Message Date
telackey 29a57930f7 Convert sub-objects (other than arrays) in YAML to JSON strings automatically.
Tests / sdk_tests (pull_request) Successful in 4m28s
2023-11-17 16:41:44 -06:00
Zach 37b69da3bb Merge pull request #35 from cerc-io/dboreham/remove-lerna-file
Remove unnecessary lerna.json file
2023-04-04 09:14:47 -04:00
dboreham 707b3049ef Remove unnecessary lerna.json file 2023-04-04 07:09:48 -06:00
2 changed files with 8 additions and 5 deletions
-5
View File
@@ -1,5 +0,0 @@
{
"version": "2.9.0",
"useWorkspaces": true,
"npmClient": "yarn"
}
+8
View File
@@ -36,6 +36,14 @@ export const handler = async (argv: Arguments) => {
}
const { record } = await yaml.load(fs.readFileSync(file, 'utf-8')) as any;
// Convert sub-objects (other than arrays) to a JSON automatically.
for (const [k, v] of Object.entries(record)) {
if (v && typeof v === "object" && !Array.isArray(v)) {
record[k] = JSON.stringify(v);
}
}
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
const fee = getGasAndFees(argv, cnsConfig);
const result = await registry.setRecord({ privateKey: userKey, record, bondId }, txKey as string, fee);