Skip to content

Commit

Permalink
refactor: consistent updateState return
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 19, 2023
1 parent 662d57a commit 3e5b4c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/inter-protocol/src/auction/auctionBook.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ export const prepareAuctionBook = (baggage, zcf, makeRecorderKit) => {
priceFrom(quote).denominator.value
}`,
);
return (state.updatingOracleQuote = priceFrom(quote));
state.updatingOracleQuote = priceFrom(quote);
},
fail: reason => {
throw Error(
Expand Down
2 changes: 1 addition & 1 deletion packages/inter-protocol/src/price/fluxAggregatorKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const prepareFluxAggregatorKit = async (
priceAuthority.makeQuoteNotifier(unitAmountIn, brandOut),
{
updateState: quote => {
priceKit.recorder.write(priceDescriptionFromQuote(quote));
void priceKit.recorder.write(priceDescriptionFromQuote(quote));
},
fail: reason => {
throw Error(`priceAuthority observer failed: ${reason}`);
Expand Down
4 changes: 3 additions & 1 deletion packages/zoe/src/contracts/priceAggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ const start = async (zcf, privateArgs) => {

// for each new quote from the priceAuthority, publish it to off-chain storage
observeNotifier(priceAuthority.makeQuoteNotifier(unitAmountIn, brandOut), {
updateState: quote => publisher.publish(priceDescriptionFromQuote(quote)),
updateState: quote => {
publisher.publish(priceDescriptionFromQuote(quote));
},
fail: reason => {
throw Error(`priceAuthority observer failed: ${reason}`);
},
Expand Down

0 comments on commit 3e5b4c5

Please sign in to comment.