-
Notifications
You must be signed in to change notification settings - Fork 137
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
test cosmjs extension #477
base: main
Are you sure you want to change the base?
test cosmjs extension #477
Conversation
skylinezum
commented
Jun 18, 2024
- Able to run staking.test.ts,
- Modified cosmjs-extension's main-wallet.ts to bypass the window environment
… for deploy and port forward
fix: fix starship
- move config.yaml to project/starship/ - update corresponding paths
- create cosmjs wallet from leap extension
- remove unused lines - remove cosmjs wallet from cosmos-kit
wallets/cosmjs-extension/README.md
Outdated
@@ -0,0 +1,40 @@ | |||
# @cosmos-kit/leap-extension |
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 read cosmjs-extension
|
||
async getAccount(chainId: string) { | ||
// const key = await this.client.getKey(chainId); | ||
const mnemonic = this.generateMnemonic(); |
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 seems that it would be non-deterministic — shouldn't the client somehow have a reference to the mnemonic? and we create it in the test itself?
- clean up readme for cosmjs-extension - allow passsing in an optional mnemonic or let it generate by default.
- .yarn.lock - 'nock'; remove ;
- clean up readme for cosmjs-extension - allow passsing in an optional mnemonic or let it generate by default. - fix merge conflicts
…ch-space/cosmos-kit into testing/starship-steven
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.
reviewed with @pyramation @theothersideofgod
"starship:deploy": "starship deploy --config ./starship/starship.yaml", | ||
"starship:ports": "starship start-ports --config ./starship/starship.yaml", | ||
"starship:teardown": "starship teardown --config ./starship/starship.yaml", |
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.
remove these lines
"@starship-ci/cli": "1.9.0", | ||
"starshipjs": "^1.4.0", |
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.
upgrade to starship@latest
yarn starship setup | ||
|
||
# sanity check | ||
yarn starship get-pods | ||
|
||
# deploy starship | ||
yarn starship deploy | ||
|
||
# wait til STATUS=Running | ||
yarn starship get-pods | ||
|
||
# port forwarding | ||
yarn starship start-ports | ||
|
||
# check pids | ||
yarn starship port-pids |
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.
replace with yarn starship start
```sh | ||
# stop port forwarding (done by clean() too) | ||
# yarn starship stop-ports | ||
|
||
# stop ports and delete & remove helm chart | ||
yarn starship clean | ||
``` |
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.
replace with yarn starship stop
# stop ports and delete & remove helm chart | ||
yarn starship clean | ||
``` | ||
|
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.
Advanced Documentation
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.
Check latest docs in starship repo
signer: string, | ||
data: string | Uint8Array, | ||
): Promise<StdSignature> { | ||
return await this.client.signArbitrary(chainId, signer, data); |
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.
signArbitrary
may not exist
import Long from 'long'; | ||
|
||
export class CosmjsClient implements WalletClient { | ||
readonly client: Cosmjs; |
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.
add comment:
warning: CosmjsClient is for testing only! Mnemonic is gettable.
prettyName: 'Cosmjs', | ||
logo: ICON, | ||
mode: 'extension', | ||
mobileDisabled: () => !('cosmjs' in window || /CosmjsCosmos/i.test(navigator.userAgent)), |
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.
set to true
prettyName: 'Cosmjs', | ||
logo: ICON, | ||
mode: 'extension', | ||
mobileDisabled: () => !('cosmjs' in window || /CosmjsCosmos/i.test(navigator.userAgent)), |
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.
@pyramation @theothersideofgod isInstalled
maybe add this method here.
"dependencies": { | ||
"@cosmos-kit/leap-extension": "^2.9.0", | ||
"@cosmos-kit/leap-metamask-cosmos-snap": "^0.8.0", | ||
"@cosmos-kit/leap-mobile": "^2.8.0" | ||
}, |
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.
remove
|