-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add a past time test for dynamic dispatch task #103
Conversation
imstar15
commented
Nov 27, 2023
- Add a past time test for dynamic dispatch task
- Fix code for eslint
|
* dynamicDispatchTask.recurring with nextExecutionTime that is is a past time fails | ||
*/ | ||
it( | ||
"dynamicDispatchTask.recurring with nextExecutionTime that is a past time fails", |
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.
Added a test
"dynamicDispatchTask.recurring with nextExecutionTime that is a past time fails"
It will throw an Error with automation.InvalidTime message
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 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.
Sorry.
If the past time is on a time slot, it will throw a PastTime
error; otherwise, it will throw an InvalidTime
error.
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
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.
Okay, the PastTime test case looks working now. I have left one comment.
@@ -67,29 +146,37 @@ export const sendExtrinsic = async ( | |||
polkadotApi, |
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.
This sendExtrinsic is written different from the one in ./demo
. Why not copy ./demo
over to be consistent?
This function look confusing, because it didn’t has a keyPair in paramter list. Who signs the transaction?
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.
Yes, it's better to pass the keyringPair
into the sendExtrinsic
function to sign and dispatch the extrinsic.
Currently, within the code structure, the signing step is already completed during the extrinsic build process.
This might be something to consider for modification during future code refactoring.
* Add a past time test for dynamic dispatch task * Specific errors were thrown during testing * Fix past time test with time slot
* Add a past time test for dynamic dispatch task (#103) * Add a past time test for dynamic dispatch task * Specific errors were thrown during testing * Fix past time test with time slot * Auto compound interfaces (#99) * Fix adapter * Auto compound interfaces * Remove eslint-disable-next-line import/no-extraneous-dependencies * Update @polkadot/typegen, "@polkadot/types version to ^10.9.1 * Remove ChainData; Add instructionNetworkType to XcmConfig * Add tests for auto-compound * Listen events * Return after the reject or resolve statement * Revert "Return after the reject or resolve statement" This reverts commit a5fe124. * Change ensureBalance to hasEnoughFreeBalance * Rename test case names * If the delegation does not exist, getAutoCompoundingDelegationPercentage return undefined * Add description for Compound tests --------- Co-authored-by: imstar15 <[email protected]>
* Merge dev_bakup to dev branch (#108) * Add a past time test for dynamic dispatch task (#103) * Add a past time test for dynamic dispatch task * Specific errors were thrown during testing * Fix past time test with time slot * Auto compound interfaces (#99) * Fix adapter * Auto compound interfaces * Remove eslint-disable-next-line import/no-extraneous-dependencies * Update @polkadot/typegen, "@polkadot/types version to ^10.9.1 * Remove ChainData; Add instructionNetworkType to XcmConfig * Add tests for auto-compound * Listen events * Return after the reject or resolve statement * Revert "Return after the reject or resolve statement" This reverts commit a5fe124. * Change ensureBalance to hasEnoughFreeBalance * Rename test case names * If the delegation does not exist, getAutoCompoundingDelegationPercentage return undefined * Add description for Compound tests --------- Co-authored-by: imstar15 <[email protected]> * Return different instruction numbers based on the transactType (#110) * Renamed chainData to chainConfig in adapters * Added moment library root to fix test/sdk/sdk.test.ts dependency missing problem * Updated to getChainConfig() in test/sdk/sdk.test.ts * Added a temporary fix for MoonbeamAdapter fetchAndUpdateConfigs * Defined build order in package.json to make sure config builds first * Remove from git add from package.json * Upgraded yarn to use the workspace feature * Added root:true to make sure .eslintrc.json works as the root path * Added custom errors to adapter package * Updated dependency of adapter to config@^1.0.0 * Updated the dependencies among our packages * Added isEthereum to all chains in the config package * Added util functions to adapter * Fix WeightToFee function in MangataAdapter (#111) * Fix WeightToFee function in MangataAdapter * Caculate unit by decimals * Change chainData to chainConfig * Fix mangata crossChainTransfer function * Rename x2Params to interior * Format code with .prettierrc * Fixed Github Actions caused by the new yarn berry version (#112) * Try to fix yarn@2 issue caused in Actions * Fix a typo in Release Action * Try to fix dependency missing issue in Actions * Run yarn install with yarn berry version in local environment * Turn off installConfig.immutable in .yarnrc.yml in github Actions * Turn off installConfig.immutable in .yarnrc.yml in github Actions * Added continue-on-error: true to changeset Pull Release in Action * Remove testing trigger branch from .github/workflows/release.yml * Updated Github Actions using yarn berry version * Optimize typescript files based on eslint suggestions * docs(changeset): Updated dependencies among @oak-network/packages to refer to the latest code instead of fixed version * Reverted package reference strategy back to workspace:^1.0.0 (#114) * Reverted package reference strategy back to workspace:^1.0.0 * docs(changeset): Reverted package reference strategy back to workspace:^1.0.0 * Fix publish dev version to NPM Github Actions (#116) * Added ls command to print out the current path in Action * Make sure postbuild script run * Clean up github actions * RELEASING: Releasing 5 package(s) (#115) Releases: @oak-network/[email protected] @oak-network/[email protected] @oak-network/[email protected] @oak-network/[email protected] @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * RELEASING: Releasing 5 package(s) (#117) Releases: @oak-network/[email protected] @oak-network/[email protected] @oak-network/[email protected] @oak-network/[email protected] @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Update script/package-setup.js (#118) * docs(changeset): SDK and adapter upgrades with automationPrice support * Update package-setup.js * RELEASING: Releasing 2 package(s) (#119) Releases: @oak-network/[email protected] @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Export utils constants and errors from adapters (#120) * Export utils constants and errors from adapters * docs(changeset): Export utils constants and errors from adapters * Set the release action to trigger only on main branch * Revert "Set the release action to trigger only on main branch" This reverts commit 67900f5. * RELEASING: Releasing 1 package(s) (#121) Releases: @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Add scheduleAs to task params (#122) * Add scheduleAs to task params * docs(changeset): Add scheduleAs to task params * The scheduleAs parameter should be pass into schedule task function * RELEASING: Releasing 1 package(s) (#123) Releases: @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Change oakAdapter account derivation (#125) * Change oakAdapter account derivation * docs(changeset): Change oakAdapter account derivation * RELEASING: Releasing 2 package(s) (#127) Releases: @oak-network/[email protected] @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Rename xtokens to xTokens in astarAdapter (#126) * Rename xtokens to xTokens in astarAdapter * docs(changeset): Rename xtokens to xTokens in astarAdapter * RELEASING: Releasing 1 package(s) (#128) Releases: @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Added currencyId to tokens of Turing chains (#129) * docs(changeset): Export utils constants and errors from adapters * Added currencyId to tokens of Turing chains * docs(changeset): Added currency Id to the tokens registered on Turing chains * Revert "docs(changeset): Export utils constants and errors from adapters" This reverts commit d89c5fd. * RELEASING: Releasing 1 package(s) (#131) Releases: @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fix a problem where currencyId is not set on Turing chains (#132) * Fix a problem where currencyId is not set on Turing chains * docs(changeset): Fix a problem where currencyId is not set on Turing chains * RELEASING: Releasing 1 package(s) (#133) Releases: @oak-network/[email protected] [skip ci] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: imstar15 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>