Skip to content

Commit

Permalink
chore: address some linting errors revealed in merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Dec 14, 2023
1 parent 918c73b commit 62428ac
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
7 changes: 3 additions & 4 deletions packages/governance/src/contractHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const publicMixinAPI = harden({
});

/**
* @param {ZCF<GovernanceTerms<{}> & {}>} zcf
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<unknown>} paramManager
@template {import('./contractGovernance/typedParamManager.js').ParamTypesMap} T Governed parameters of contract * @param {ZCF<GovernanceTerms<{}> & {}>} zcf
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<T>} paramManager
*/
export const validateElectorate = (zcf, paramManager) => {
const { governedParams } = zcf.getTerms();
Expand All @@ -53,8 +53,7 @@ harden(validateElectorate);
/**
* Utility function for `makeParamGovernance`.
*
* @template T
* @param {ZCF<GovernanceTerms<{}> & {}>} zcf
* @template {import('./contractGovernance/typedParamManager.js').ParamTypesMap} T Governed parameters of contract * @param {ZCF<GovernanceTerms<{}> & {}>} zcf
* @param {import('./contractGovernance/typedParamManager').TypedParamManager<T>} paramManager
*/
const facetHelpers = (zcf, paramManager) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/governance/src/electorateTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { deeplyFulfilled, Far } from '@endo/marshal';
* @param {MapStore<Handle<'Question'>, QuestionRecord>} questionStore
* @param {Publisher<unknown>} questionPublisher
* @param {Publisher<OutcomeRecord>} outcomePublisher
* @returns {AddQuestionReturn}
* @returns {Promise<AddQuestionReturn>}
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/governance/src/types-ambient.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@
* @param {Installation} voteCounterInstallation
* @param {import('@agoric/time/src/types').Timestamp} deadline
* @param {ParamChangesSpec<P>} paramSpec
* @returns {ContractGovernanceVoteResult}
* @returns {Promise<ContractGovernanceVoteResult>}
*/

/**
Expand All @@ -632,7 +632,7 @@
* @param {Installation} voteCounterInstallation
* @param {import('@agoric/time/src/types').Timestamp} deadline
* @param {string[]} strings
* @returns {ContractGovernanceVoteResult}
* @returns {Promise<ContractGovernanceVoteResult>}
*/

/**
Expand Down
8 changes: 7 additions & 1 deletion packages/smart-wallet/src/offerWatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ import { UNPUBLISHED_RESULT } from './offers.js';
* }} OfferStatus
*/

/**
* @template V fulfilled value
* @template {any[]} [A=unknown[]] arguments
* @typedef { {onFulfilled?: (value: V, ...args: A) => void, onRejected?: (reason: unknown, ...args: A) => void} } PromiseWatcher
*/

/**
* @template {any} T
* @typedef {import('@agoric/swingset-liveslots').PromiseWatcher<T, [UserSeat]>} OfferPromiseWatcher<T, [UserSeat]
* @typedef {PromiseWatcher<T, [UserSeat]>} OfferPromiseWatcher<T, [UserSeat]
*/

/**
Expand Down
1 change: 1 addition & 0 deletions packages/smart-wallet/src/smartWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ export const prepareSmartWallet = (baggage, shared) => {

const invitation = invitationFromSpec(offerSpec.invitationSpec);
const invitationAmount =
// eslint-disable-next-line no-await-in-loop, @jessie.js/no-nested-await
await E(invitationIssuer).getAmountOf(invitation);
const watcher = makeOfferWatcher(
facets.helper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ export const buildRootObject = async () => {
v1BundleId || Fail`bundleId must not be empty`;
installation = await E(zoe).installBundleID(v1BundleId);

const autoRefundBundleId = await E(vatAdmin).getBundleIDByName(
'automaticRefund',
);
const autoRefundInstallation = await E(zoe).installBundleID(
autoRefundBundleId,
);
const autoRefundBundleId =
await E(vatAdmin).getBundleIDByName('automaticRefund');
const autoRefundInstallation =
await E(zoe).installBundleID(autoRefundBundleId);
const { instance } = await E(zoe).startInstance(autoRefundInstallation, {
Moola: moolaKit.issuer,
});
Expand Down
1 change: 1 addition & 0 deletions packages/smart-wallet/test/test-addAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ test.serial('trading in non-vbank asset: game real-estate NFTs', async t => {
await finishBootstrap(somePowers, bundles);
t.log(
'install game contract bundle with hash:',
// @ts-expect-error It's present on a subset of the types of bundles.game
bundles.game.endoZipBase64Sha512.slice(0, 24),
'...',
);
Expand Down
1 change: 0 additions & 1 deletion packages/vats/src/core/basic-behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ export const makeAddressNameHubs = async ({
const { nameHub: namesByAddress, nameAdmin: namesByAddressAdmin } =
makeNameHubKit();
produce.namesByAddress.resolve(namesByAddress);
// @ts-expect-error deprecated type structure
produce.namesByAddressAdmin.resolve(namesByAddressAdmin);

const perAddress = address => {
Expand Down
2 changes: 1 addition & 1 deletion packages/vats/src/core/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@
*/

/**
* @template T
* @typedef {object} Producer<T>
* @property {(v: ERef<T>) => void} resolve
* @property {(r: unknown) => void} reject
* @property {(reason?: unknown) => void} reset
* @template T
*/
/**
* @typedef {{ bundleName?: string, bundleID?: string }} VatSourceRef
Expand Down

0 comments on commit 62428ac

Please sign in to comment.