-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/offer handler test not resolving vow from async-flow #25
base: main
Are you sure you want to change the base?
Conversation
CI fails from:
How do we allow this change here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM. Before merging please squash the fixup commit. (E.g. git rebase --interactive --autosquash
)
Note that #20's title is "contract test to act like UI client". This fixes the one problem described in the issue body but I'm not certain it satisfies the title well enough to close that issue. You know this app much better than I so I leave that to you to decide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a 3rd getOfferResult
call that should also get the vt.when(...)
treatment.
@@ -201,6 +230,55 @@ const makeTestContext = async t => { | |||
}, | |||
}); | |||
|
|||
const localchain = Far('DummyLocalchain', { | |||
getChainHub: async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localchain doesn't have a getChainHub
method, does it?
[ | ||
'ubld', | ||
{ | ||
brand: '$0.Alleged: BLD brand', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value here should be a brand, not a string, right?
Why use a custom namehub implementation? boot-tools.js
sets up agoricNames
and agoricNamesAdmin
in the boostratp promise space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seeing this when I try to using agoricNames from boot-tools as you mention here:
orca-contract › orchestrate - osmosis makeAccount and fund returns a ContinuingOfferResult
Rejected promise returned by test. Reason:
Error {
message: 'chain not found:agoric',
}
› makeError (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/ses/src/error/assert.js:349:61)
› eval (.../async-flow/src/convert.js:100:1)
› innerConvert (.../async-flow/src/convert.js:57:8)
› convertRecur (.../async-flow/src/convert.js:26:8)
› Alleged: replayMembrane.convert [as guestToHost] (.../async-flow/src/convert.js:76:1)
› eval (.../async-flow/src/async-flow.js:265:37)
and
Error#1: "nameKey" not found: "chain"
at makeError (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/ses/src/error/assert.js:349:61)
at Function.fail (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/ses/src/error/assert.js:481:20)
at NonNullish (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@agoric/internal/src/errors.js:14:10)
at Object.lookup (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@agoric/vats/src/nameHub.js:177:15)
at In "lookup" method of (NameHubKit nameHub) [as lookup] (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@endo/exo/src/exo-tools.js:171:24)
at localApplyMethod (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@endo/eventual-send/src/local.js:126:18)
at Object.applyMethod (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@endo/eventual-send/src/handled-promise.js:455:16)
at dispatchToHandler (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@endo/eventual-send/src/handled-promise.js:156:22)
at doDispatch (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@endo/eventual-send/src/handled-promise.js:486:7)
at win (file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@endo/eventual-send/src/handled-promise.js:505:26)
at file:///Users/jovonni/Documents/projects/dapp-orchestration-basics/node_modules/@endo/eventual-send/src/handled-promise.js:523:20
digging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will review when CI is green
d889d4d
to
1694eac
Compare
…mocks for localchain.makeAccount, and vBankAssets. Prettier applied as well
1694eac
to
0a2b68f
Compare
Fixes #20 , good catch @dckc 🚀