Skip to content

Commit

Permalink
Update bug example
Browse files Browse the repository at this point in the history
  • Loading branch information
liamgriffiths committed Jul 16, 2024
1 parent ee03c53 commit 3e146ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
1 change: 1 addition & 0 deletions examples/arbitrary-future-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async function main() {
const result = new Box(
{
value: {
x: latin.future.value.xyz,
a: latin.future.value[numbers.future.value[0]],
b: greek.future.value[latin.future.value[1]],
ab: sb.concat(greek.future.value.a, greek.future.value.b),
Expand Down
34 changes: 14 additions & 20 deletions examples/bug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,22 @@ async function main() {

const substrate = new Substrate({ apiKey: SUBSTRATE_API_KEY });

const data = new Box(
{
value: {
letters: ["a", "b"],
index: 0,
},
}
);

const selected = new Box(
{
value: ob4: sb.get<string>(
data.future.value.object,
data.future.value.letters[1],
),
},
const data = new Box({
value: {
letters: ["a", "b"],
index: 0,
},
{ id: "selected" },
);
});

// console.log(JSON.stringify(Substrate.serialize(selected), null, 2));
// return;
const selected = new Box({
value: {
example1: sb.get<string>(
data.future.value.object,
data.future.value.letters[1],
),
example2: data.future.value.letters[data.future.value.index],
},
});

const res = await substrate.run(selected);
console.log(JSON.stringify(res.json, null, 2));
Expand Down

0 comments on commit 3e146ba

Please sign in to comment.