-
Notifications
You must be signed in to change notification settings - Fork 42
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
Initial version of E2E Test Cases and setSeed address loading issue #50
Conversation
Version changed to 0.0.5
expect(await transfer.getStatus()).toBe(TransferStatus.COMPLETE); | ||
console.log(`Transferred 1 Gwei from ${unhydratedWallet} to ${wallet}`); | ||
|
||
console.log("Fetching updated balances..."); |
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.
can we add one more transfer request that transfers remaining funds back to the CB faucet 0x6Cd01c0F55ce9E0Bf78f5E90f72b4345b16d515d
?
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.
Synced on this but the faucet contract is updated. we will have a followup
.github/workflows/test.yml
Outdated
@@ -19,3 +19,14 @@ jobs: | |||
|
|||
- name: Run Unit Tests | |||
run: npm run test | |||
|
|||
- name: Run E2E Tests |
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.
could you add instructions somewhere to run this locally as well?
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.
Sure, I added npm scripts to we can run it locally and README is also updated.
5a8d209
to
cd80753
Compare
fc7cbe5
to
4f01261
Compare
src/coinbase/tests/e2e.ts
Outdated
); | ||
|
||
console.log("Importing wallet with balance..."); | ||
const seedFile = JSON.parse(process.env.SEED || ""); |
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 should be process.env.SEED_FILE instead of process.env.SEED. It is confusing
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.
@jazz-cb sure, it is content of the seed file. Maybe SEED_FILE_CONTENT?
45ec424
to
1f98319
Compare
.github/workflows/test.yml
Outdated
@@ -19,3 +19,12 @@ jobs: | |||
|
|||
- name: Run Unit Tests | |||
run: npm run test | |||
|
|||
- name: Run E2E Tests |
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.
Should we run the E2E tests in their own github action separate from unit tests?
Will help in reporting in identifying what is the error more quickly
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.
makes sense, I created a workflow file for e2e tests.
README.md
Outdated
|
||
```typescript | ||
user.saveWallet(wallet); | ||
user.saveSeed(wallet); |
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.
wallet.saveSeed
README.md
Outdated
@@ -165,16 +165,16 @@ In order to persist the data for the Wallet, you will need to implement a store | |||
await store(data); | |||
``` | |||
|
|||
For convenience during testing, we provide a `saveWallet` method that stores the Wallet data in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes. | |||
For convenience during testing, we provide a `saveSeed` method that stores the Wallet data in your local file system. This is an insecure method of storing wallet seeds and should only be used for development purposes. |
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.
saveSeed
method that stores the wallet's seed in your local file system
README.md
Outdated
``` | ||
|
||
To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking `saveWallet` and `loadWallets`. | ||
To encrypt the saved data, set encrypt to true. Note that your CDP API key also serves as the encryption key for the data persisted locally. To re-instantiate wallets with encrypted data, ensure that your SDK is configured with the same API key when invoking `saveSeed` and `loadWallets`. |
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.
saveSeed
and loadSeed
.
63f3960
to
d2d5b41
Compare
What changed? Why?
Qualified Impact