-
Notifications
You must be signed in to change notification settings - Fork 98
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
Ana/add better validation for cosmos addresses #3371
Conversation
This PR doesn't scale to other networks. Can you write it in a way, that it scales to other Cosmos networks and other PoS networks like livepeer? |
Maybe too much for one single PR? I mean, other Cosmos networks easy, but all other networks... Livepeer is already covered anyway by the |
@@ -127,6 +134,18 @@ export default { | |||
return false | |||
} | |||
}, | |||
isNotAnyOtherCosmosAddress(param) { |
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.
instead of blacklisting prefixes, how about checking if the prefix is whitelisted => a bech32_prefix
in any network
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.
OK, I think I just implemented it like you had in mind
awesome to see you investigating sentry errors and discovering problems this way! |
Codecov Report
@@ Coverage Diff @@
## develop #3371 +/- ##
===========================================
+ Coverage 91.45% 91.47% +0.01%
===========================================
Files 127 127
Lines 2014 2017 +3
Branches 303 316 +13
===========================================
+ Hits 1842 1845 +3
Misses 167 167
Partials 5 5
|
" | ||
name="You can only sign in with a regular Cosmos address, starting with 'cosmos1'" | ||
name="You can only sign in with a regular address" |
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 is not a good error message. what does "regular" actually mean to a user?
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.
I know, but it is difficult to find a broad enough message to cover all networks... Any suggestions?
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.
difficult to find a broad enough message to cover all networks
true! then the error messages should be network specific.
for now: "We don't currently support this type of address. Please try a different address format." ...?
param.substring(0, 13) !== "cosmosvalcons" && | ||
param.substring(0, 16) !== "cosmosvalconspub" && | ||
param.substring(0, 16) !== "cosmosvaloperpub" | ||
param.substring(0, 7) === "cosmos1" || |
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.
@Bitcoinera @faboweb this is another place where we should think about how to reduce frontend changes for new networks...
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.
#underengineered @faboweb 😝
* Fabo/handle image null on validator page (#3319) * handle picture is null * changelog * handle null images on page validator * Update proposals every new block (#3295) * Update proposals every 10 blocks * changelog * istanbul ignore next * Trigger CI * istanbul ignore next * Use loaded * Update snap * istanbul ignore next * Update single proposal page every new block * Job is done! * Comment * Remove comment * istanbul ignore next * Improve coverage * Update all proposal data * Simplify * Revert * Fix watcher func testing * Fix, cleanup, optimization * Update snap * Cleanup * chooseFilter for pagevalidator. fix website (#3289) * chooseFilter for pagevalidator. fix website * changelog * add filter as second parameter * add test for isblankfield * lint * Ana/3313 add link for linux users to ledger connection issues article (#3315) * add linux webusb message. center signin button * add linux test but it errors. lint * changelog * fix linux message test * Ana/fixes-for-pagevalidator (#3323) * small but important fixes * changelog * Fabo/handle async tx failure (#3327) * add new property to receive notification if tx inclusion failed * dev life * changelog * fix tests * Jordan/tx flow love (#3329) * added x back to action modal * icon will spin now on inclusion step * corrected grammar and improved messaging on success step * pass in success prop to turn success icon green * renamed delegation to staking * renamed undelegation to unstaked * fixed tests and snapshots * changelog * success should be boolean, increase padding on action modal message * unknown getter / fixed test * implemented feature flags that are separate from action modal titles * hid create proposals button while loading proposals page * updated feature not available language * updated confirmation message and form message padding * improved form ux by updating placeholders, setting v-focus, and setting initial values to null so user doesn't have to delete the value before entering their own * lint and tests and snaps * fixed page proposals test * Fix error 404 in validator links from transactions in page block (#3344) * Fix URLs * changelog * Update snaps * Fabo/3314 session per network (#3336) * store sessions per network * changelog * fixed tests * Remove unused quey field (#3350) * Remove unused quey field * changelog * Ana/fix session per network (#3354) * fix * changelog * New tutorial component (#3346) * Component draft * changelog * Add steps * First steps done * Add step dots and read the full guide link text * css tweaks * css tweaks * Cleanup * Update snap * Cleanup * Basic testing * Cleanup, testing * Cleanup, props, testing * Remove v-html * Fix close * istanbul ignore next * Fix * Show tutorial demo in experimentalMode * Testing stuff * Fabo/improve release script (#3332) * changelog * remove push pre releasing * merge master to get new version * changelog * better develop checkout * removed the eslint vscode thing * checkout develop from remote to avoid checking in local develop changs * handle develop branch already existing * github_action_added (#3352) * Ana/add emoney logo (#3358) * add emoney logo * changelog * Fix typo (#3351) * Fix typo * changelog * Fabo/3316 cross account creation (#3337) * basis for cross network account creation * cleanup and refactor * changelog * fixed tests * linted * coverage * new cosmos-keys with support for multiple bech32prefixes * Ana/fix multi send to address (#3359) * fix multi send to address * changelog * Ana/livepeer explore mode frontend (#3349) * allow explore with non cosmos addresses * lint * fix * filter only pending undelegations * update snapshots * changelog * changelog * remove filter undelegations. change changelog * add pendingundelegations query. use in portfolio * update snapshot * changelog * check if undelegations exist * change to web3-utils isaddress * add ethereum validation tests * lint * use pending undelegations from be directly * get rid of pendingundelegations. back to normality * query for undelegations directly * Fix redelegation (#3281) * Fix redelegation * changelog * Debug * Implement redelegate in undelegation modal * Redelegation stuff, disable from * Redelegations working * Cleanup * Fix test, update snap * Revert DelegationModal changes * Update snap * Delete restaking logic in DelegationModal * Delete logic * Update snaps * Testing stuff * Remove unused code * Fix * setFromSelectedIndex test * istanbul ignore next * More testing stuff * Cleanup * More testing * Refactor, 100% coverage * Improve coverage * Jordan suggestions * Inactive validator warning msgs, testing * Fix bug, improve testing * Trigger CI * use standard inputs and refactor validator format * remove dead code Co-authored-by: Fabian <frznhope@gmail.com> * Fix session modal validation triggers on closing (#3374) * Clear session data on first step * Same in address import * Move clear data to beforeDestroy in the last step * testing stuff * changelog * Ana/fix lunie browser extension link (#3366) * fix link * changelog * Fabo/better handling of sequence in ActionModal (#3364) * show loading when sequence number is missing + fix some tests * changelog * security updates * log failed tx submissions client side * fix test for error tracking * changelog * fix typo * fix undefined inside sentry messages * Update src/ActionModal/components/ActionModal.vue * removed sequence loading again * snap Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Ana/fix micro denoms (#3384) * fix micro denoms * changelog * Fabo/add a button to show the address on the Ledger (#3375) * add a button to show the address on the Ledger * switched to an icon * changelog * use a warning for ledger address displaying * update styling of "show address on ledger" button * accidentally removed v-if logic Co-authored-by: Jordan Bibla <jbibla@gmail.com> * Ana/add back to validators button (#3362) * add back to validators button * changelog * apply designs to button * button improvements * Fabo/retry on failed requests (#3382) * retry on failed requests * changelog * Ana/add better validation for cosmos addresses (#3371) * add better validation for cosmos addresses * changelog * change blacklisting to whitelisting * minor fix * Ana/change svg icon for material icon (#3388) * change svg to material icon * lint * Fabo/cleanup dependencies (#3385) * show loading when sequence number is missing + fix some tests * changelog * security updates * log failed tx submissions client side * fix test for error tracking * changelog * fix typo * fix undefined inside sentry messages * Update src/ActionModal/components/ActionModal.vue * removed sequence loading again * snap * cleaned up some packages + added husky * changelog * changelog * linted * refactor web3 import to reduce size * remove no-console rule * updated more deps * remove console rule Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Ana/replace phantom div with padding (#3398) * replace phantom div with padding * changelog * Replace toggles in all and active buttons in validators page (#3397) * Replace toggles in all and active buttons * changelog * Update snap * Round total rewards to 6 decimal places (#3396) * Round total rewards to 6 decimal places * changelog * Update snaps * Remove async from describe in ActionManager test * Fabo/fetch policy (#3390) * set fetch policies correctly * fixed tests * changelog * coverage * remove cache invalidation handlers from delegation modals * switch to default fetch-policy to cache-and-network * linted * always requery data on incomming tx on delegation modal * reload balance on open in delegation modal * fix data undefined * fix delegation modal test * refetch delegations in undelegation modal * coverage * fix test Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Jordan/show on ledger (#3401) * fixed inconsistent styling issue with "show on ledger" button * only show the button when signed in with a ledger and not on mobile * changelog * release-1.0.157 Co-authored-by: Mario Pino <info@quequiereshacer.es> Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Col <colw@users.noreply.github.com> Co-authored-by: iambeone <iambeone@gmail.com>
* Fabo/handle image null on validator page (#3319) * handle picture is null * changelog * handle null images on page validator * Update proposals every new block (#3295) * Update proposals every 10 blocks * changelog * istanbul ignore next * Trigger CI * istanbul ignore next * Use loaded * Update snap * istanbul ignore next * Update single proposal page every new block * Job is done! * Comment * Remove comment * istanbul ignore next * Improve coverage * Update all proposal data * Simplify * Revert * Fix watcher func testing * Fix, cleanup, optimization * Update snap * Cleanup * chooseFilter for pagevalidator. fix website (#3289) * chooseFilter for pagevalidator. fix website * changelog * add filter as second parameter * add test for isblankfield * lint * Ana/3313 add link for linux users to ledger connection issues article (#3315) * add linux webusb message. center signin button * add linux test but it errors. lint * changelog * fix linux message test * Ana/fixes-for-pagevalidator (#3323) * small but important fixes * changelog * Fabo/handle async tx failure (#3327) * add new property to receive notification if tx inclusion failed * dev life * changelog * fix tests * Jordan/tx flow love (#3329) * added x back to action modal * icon will spin now on inclusion step * corrected grammar and improved messaging on success step * pass in success prop to turn success icon green * renamed delegation to staking * renamed undelegation to unstaked * fixed tests and snapshots * changelog * success should be boolean, increase padding on action modal message * unknown getter / fixed test * implemented feature flags that are separate from action modal titles * hid create proposals button while loading proposals page * updated feature not available language * updated confirmation message and form message padding * improved form ux by updating placeholders, setting v-focus, and setting initial values to null so user doesn't have to delete the value before entering their own * lint and tests and snaps * fixed page proposals test * Fix error 404 in validator links from transactions in page block (#3344) * Fix URLs * changelog * Update snaps * Fabo/3314 session per network (#3336) * store sessions per network * changelog * fixed tests * Remove unused quey field (#3350) * Remove unused quey field * changelog * Ana/fix session per network (#3354) * fix * changelog * New tutorial component (#3346) * Component draft * changelog * Add steps * First steps done * Add step dots and read the full guide link text * css tweaks * css tweaks * Cleanup * Update snap * Cleanup * Basic testing * Cleanup, testing * Cleanup, props, testing * Remove v-html * Fix close * istanbul ignore next * Fix * Show tutorial demo in experimentalMode * Testing stuff * Fabo/improve release script (#3332) * changelog * remove push pre releasing * merge master to get new version * changelog * better develop checkout * removed the eslint vscode thing * checkout develop from remote to avoid checking in local develop changs * handle develop branch already existing * github_action_added (#3352) * Ana/add emoney logo (#3358) * add emoney logo * changelog * Fix typo (#3351) * Fix typo * changelog * Fabo/3316 cross account creation (#3337) * basis for cross network account creation * cleanup and refactor * changelog * fixed tests * linted * coverage * new cosmos-keys with support for multiple bech32prefixes * Ana/fix multi send to address (#3359) * fix multi send to address * changelog * Ana/livepeer explore mode frontend (#3349) * allow explore with non cosmos addresses * lint * fix * filter only pending undelegations * update snapshots * changelog * changelog * remove filter undelegations. change changelog * add pendingundelegations query. use in portfolio * update snapshot * changelog * check if undelegations exist * change to web3-utils isaddress * add ethereum validation tests * lint * use pending undelegations from be directly * get rid of pendingundelegations. back to normality * query for undelegations directly * Fix redelegation (#3281) * Fix redelegation * changelog * Debug * Implement redelegate in undelegation modal * Redelegation stuff, disable from * Redelegations working * Cleanup * Fix test, update snap * Revert DelegationModal changes * Update snap * Delete restaking logic in DelegationModal * Delete logic * Update snaps * Testing stuff * Remove unused code * Fix * setFromSelectedIndex test * istanbul ignore next * More testing stuff * Cleanup * More testing * Refactor, 100% coverage * Improve coverage * Jordan suggestions * Inactive validator warning msgs, testing * Fix bug, improve testing * Trigger CI * use standard inputs and refactor validator format * remove dead code Co-authored-by: Fabian <frznhope@gmail.com> * Fix session modal validation triggers on closing (#3374) * Clear session data on first step * Same in address import * Move clear data to beforeDestroy in the last step * testing stuff * changelog * Ana/fix lunie browser extension link (#3366) * fix link * changelog * Fabo/better handling of sequence in ActionModal (#3364) * show loading when sequence number is missing + fix some tests * changelog * security updates * log failed tx submissions client side * fix test for error tracking * changelog * fix typo * fix undefined inside sentry messages * Update src/ActionModal/components/ActionModal.vue * removed sequence loading again * snap Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Ana/fix micro denoms (#3384) * fix micro denoms * changelog * Fabo/add a button to show the address on the Ledger (#3375) * add a button to show the address on the Ledger * switched to an icon * changelog * use a warning for ledger address displaying * update styling of "show address on ledger" button * accidentally removed v-if logic Co-authored-by: Jordan Bibla <jbibla@gmail.com> * Ana/add back to validators button (#3362) * add back to validators button * changelog * apply designs to button * button improvements * Fabo/retry on failed requests (#3382) * retry on failed requests * changelog * Ana/add better validation for cosmos addresses (#3371) * add better validation for cosmos addresses * changelog * change blacklisting to whitelisting * minor fix * Ana/change svg icon for material icon (#3388) * change svg to material icon * lint * Fabo/cleanup dependencies (#3385) * show loading when sequence number is missing + fix some tests * changelog * security updates * log failed tx submissions client side * fix test for error tracking * changelog * fix typo * fix undefined inside sentry messages * Update src/ActionModal/components/ActionModal.vue * removed sequence loading again * snap * cleaned up some packages + added husky * changelog * changelog * linted * refactor web3 import to reduce size * remove no-console rule * updated more deps * remove console rule Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Ana/replace phantom div with padding (#3398) * replace phantom div with padding * changelog * Replace toggles in all and active buttons in validators page (#3397) * Replace toggles in all and active buttons * changelog * Update snap * Round total rewards to 6 decimal places (#3396) * Round total rewards to 6 decimal places * changelog * Update snaps * Remove async from describe in ActionManager test * Fabo/fetch policy (#3390) * set fetch policies correctly * fixed tests * changelog * coverage * remove cache invalidation handlers from delegation modals * switch to default fetch-policy to cache-and-network * linted * always requery data on incomming tx on delegation modal * reload balance on open in delegation modal * fix data undefined * fix delegation modal test * refetch delegations in undelegation modal * coverage * fix test Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Jordan/show on ledger (#3401) * fixed inconsistent styling issue with "show on ledger" button * only show the button when signed in with a ledger and not on mobile * changelog * delete only (#3406) * Fabo/add emoney account creation (#3404) * handle emoney account creation * changelog * Ana/handle blocks links according to explorer feature (#3411) * handle blocks links according to explorer feature * changelog * added vue-jest * cach bust deps Co-authored-by: Fabian <frznhope@gmail.com> * Ana/fix waiting for extension button (#3413) * fix waiting for extension button * changelog * update snapshot * fix root of the issue * Ana/emoney sendmodal multiple denoms (#3370) * first changes * working for first balance in array * allow selecting token. add selected balance. * fix validation selectedToken * make compatible with the one token networks * make compatible for all networks. styling * simplify code * fix validations * update snapshot * sendmodal fix test and update snapshot * add tests * change position. set amount to 0 in each selection * fix first load. styling * update snapshot * remove ellipsis from form * bust dep cache * added vue-jest * update snapshot * changelog Co-authored-by: Fabian <frznhope@gmail.com> * Ana/fix signout fault (#3417) * fix signout fault * changelog * workshop on jest please * fix appmenu test * fix all tests * handle sign out on network switch correctly Co-authored-by: Fabian <frznhope@gmail.com> * Fabo/cross network ledger (#3338) * basis for cross network account creation * cleanup and refactor * changelog * cleanup * approach for cross network ledger usage * steps towards having ledger corss network * linted * fix ledger account creation * linted * tests * changelog * fixed keystore tests * fixed signup test * added some tests * added shallow test for show address for coverage * test for clearing warnings in appmenu for show address * added back emoney * Fabo/add script to add intercom keys (#3418) * add script to add intercom keys * changelog * Fabo/fixed balances not available (#3420) * fixed balances not available * changelog * fixed test * Enable Intercom in mobile apps (#3419) * Mobile Intercom * changelog * Cleanup, fix tests * Use emit * Use platform specific capacitor config files * Implement mobile Intercom using vuex store (#3424) * Intercom mobile implemented using vuex store * changelog * Lint * Mutations * Fix test * Intercom store module testing * Better code coverage * Cleanup * Fix * Cleanup * Mock capacitor-intercom * Cleanup * Ana/multiple denoms in porfolio (missing better designs) (#3365) * add balance of various tokens * update snapshot * fix word misordering * try fix asynchrony * add currency selector * fix select currency. hack for placeholder * important fixes * update snapshot * changelog * getting things ready * fixes but totalfiatvalue query not triggered * all working * update snapshot * add test for new computed fields * adapt logic to recent changes * add getalldenoms test * travel to istanbul * delete usertransactionadded * add watch test * set eur as default selected fiat currency * Fabo/add x frame header (#3428) * add x frame header * changelog * added frame ancestor header * Refactor script to add Intercom api keys (#3426) * Refactor * Revert capacitor config mod * changelog * Aleksei/graphql parameter change (#3416) * added parameter to persist API url change * added parameter to persist API url change * changelog * refactor get graphql link * refactor get graphql link * fixed test * kill abbreviation Co-authored-by: Fabian <frznhope@gmail.com> * Fabo/allow to sign messages for Terra (#3421) * allow to sign messages for Terra * Update src/ActionModal/utils/MessageConstructor.js Co-Authored-By: Jordan Bibla <jbibla@gmail.com> * added more messages to terra * skip balance query if no denom known * refactor send modal * handle denoms when no balances * fix amount of undefined * fix selected index not checked correctly * changelog * fixed some tests * fixed sendmodal tests Co-authored-by: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Fabo/force refresh on index htm (#3433) * no caching for index.html * changelog * Fabo/emoney-signing (#3430) * allow to sign messages for Terra * Update src/ActionModal/utils/MessageConstructor.js Co-Authored-By: Jordan Bibla <jbibla@gmail.com> * added more messages to terra * skip balance query if no denom known * refactor send modal * handle denoms when no balances * fix amount of undefined * fix selected index not checked correctly * changelog * fixed some tests * fixed sendmodal tests * allow signing for emoney as well Co-authored-by: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Fabo/fix transactions not displaying for terra (#3431) * only use messag suffix for transaction component detection * changelog * changelog * adjust old snaps * linted * Apply suggestions from code review Co-Authored-By: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Jordan Bibla <jbibla@gmail.com> * Ana/better multiple denoms porfolio version (#3434) * pyramid state * add scroll. scroll bar not showing * Update src/components/common/TmBalance.vue * switch ids for classes * Update TmBalance.vue * fixed tests * changelog Co-authored-by: Fabian <frznhope@gmail.com> * cleanup changes * fix release script * release-1.0.158 Co-authored-by: Mario Pino <info@quequiereshacer.es> Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Col <colw@users.noreply.github.com> Co-authored-by: iambeone <iambeone@gmail.com>
* Fabo/handle image null on validator page (#3319) * handle picture is null * changelog * handle null images on page validator * Update proposals every new block (#3295) * Update proposals every 10 blocks * changelog * istanbul ignore next * Trigger CI * istanbul ignore next * Use loaded * Update snap * istanbul ignore next * Update single proposal page every new block * Job is done! * Comment * Remove comment * istanbul ignore next * Improve coverage * Update all proposal data * Simplify * Revert * Fix watcher func testing * Fix, cleanup, optimization * Update snap * Cleanup * chooseFilter for pagevalidator. fix website (#3289) * chooseFilter for pagevalidator. fix website * changelog * add filter as second parameter * add test for isblankfield * lint * Ana/3313 add link for linux users to ledger connection issues article (#3315) * add linux webusb message. center signin button * add linux test but it errors. lint * changelog * fix linux message test * Ana/fixes-for-pagevalidator (#3323) * small but important fixes * changelog * Fabo/handle async tx failure (#3327) * add new property to receive notification if tx inclusion failed * dev life * changelog * fix tests * Jordan/tx flow love (#3329) * added x back to action modal * icon will spin now on inclusion step * corrected grammar and improved messaging on success step * pass in success prop to turn success icon green * renamed delegation to staking * renamed undelegation to unstaked * fixed tests and snapshots * changelog * success should be boolean, increase padding on action modal message * unknown getter / fixed test * implemented feature flags that are separate from action modal titles * hid create proposals button while loading proposals page * updated feature not available language * updated confirmation message and form message padding * improved form ux by updating placeholders, setting v-focus, and setting initial values to null so user doesn't have to delete the value before entering their own * lint and tests and snaps * fixed page proposals test * Fix error 404 in validator links from transactions in page block (#3344) * Fix URLs * changelog * Update snaps * Fabo/3314 session per network (#3336) * store sessions per network * changelog * fixed tests * Remove unused quey field (#3350) * Remove unused quey field * changelog * Ana/fix session per network (#3354) * fix * changelog * New tutorial component (#3346) * Component draft * changelog * Add steps * First steps done * Add step dots and read the full guide link text * css tweaks * css tweaks * Cleanup * Update snap * Cleanup * Basic testing * Cleanup, testing * Cleanup, props, testing * Remove v-html * Fix close * istanbul ignore next * Fix * Show tutorial demo in experimentalMode * Testing stuff * Fabo/improve release script (#3332) * changelog * remove push pre releasing * merge master to get new version * changelog * better develop checkout * removed the eslint vscode thing * checkout develop from remote to avoid checking in local develop changs * handle develop branch already existing * github_action_added (#3352) * Ana/add emoney logo (#3358) * add emoney logo * changelog * Fix typo (#3351) * Fix typo * changelog * Fabo/3316 cross account creation (#3337) * basis for cross network account creation * cleanup and refactor * changelog * fixed tests * linted * coverage * new cosmos-keys with support for multiple bech32prefixes * Ana/fix multi send to address (#3359) * fix multi send to address * changelog * Ana/livepeer explore mode frontend (#3349) * allow explore with non cosmos addresses * lint * fix * filter only pending undelegations * update snapshots * changelog * changelog * remove filter undelegations. change changelog * add pendingundelegations query. use in portfolio * update snapshot * changelog * check if undelegations exist * change to web3-utils isaddress * add ethereum validation tests * lint * use pending undelegations from be directly * get rid of pendingundelegations. back to normality * query for undelegations directly * Fix redelegation (#3281) * Fix redelegation * changelog * Debug * Implement redelegate in undelegation modal * Redelegation stuff, disable from * Redelegations working * Cleanup * Fix test, update snap * Revert DelegationModal changes * Update snap * Delete restaking logic in DelegationModal * Delete logic * Update snaps * Testing stuff * Remove unused code * Fix * setFromSelectedIndex test * istanbul ignore next * More testing stuff * Cleanup * More testing * Refactor, 100% coverage * Improve coverage * Jordan suggestions * Inactive validator warning msgs, testing * Fix bug, improve testing * Trigger CI * use standard inputs and refactor validator format * remove dead code Co-authored-by: Fabian <frznhope@gmail.com> * Fix session modal validation triggers on closing (#3374) * Clear session data on first step * Same in address import * Move clear data to beforeDestroy in the last step * testing stuff * changelog * Ana/fix lunie browser extension link (#3366) * fix link * changelog * Fabo/better handling of sequence in ActionModal (#3364) * show loading when sequence number is missing + fix some tests * changelog * security updates * log failed tx submissions client side * fix test for error tracking * changelog * fix typo * fix undefined inside sentry messages * Update src/ActionModal/components/ActionModal.vue * removed sequence loading again * snap Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Ana/fix micro denoms (#3384) * fix micro denoms * changelog * Fabo/add a button to show the address on the Ledger (#3375) * add a button to show the address on the Ledger * switched to an icon * changelog * use a warning for ledger address displaying * update styling of "show address on ledger" button * accidentally removed v-if logic Co-authored-by: Jordan Bibla <jbibla@gmail.com> * Ana/add back to validators button (#3362) * add back to validators button * changelog * apply designs to button * button improvements * Fabo/retry on failed requests (#3382) * retry on failed requests * changelog * Ana/add better validation for cosmos addresses (#3371) * add better validation for cosmos addresses * changelog * change blacklisting to whitelisting * minor fix * Ana/change svg icon for material icon (#3388) * change svg to material icon * lint * Fabo/cleanup dependencies (#3385) * show loading when sequence number is missing + fix some tests * changelog * security updates * log failed tx submissions client side * fix test for error tracking * changelog * fix typo * fix undefined inside sentry messages * Update src/ActionModal/components/ActionModal.vue * removed sequence loading again * snap * cleaned up some packages + added husky * changelog * changelog * linted * refactor web3 import to reduce size * remove no-console rule * updated more deps * remove console rule Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Ana/replace phantom div with padding (#3398) * replace phantom div with padding * changelog * Replace toggles in all and active buttons in validators page (#3397) * Replace toggles in all and active buttons * changelog * Update snap * Round total rewards to 6 decimal places (#3396) * Round total rewards to 6 decimal places * changelog * Update snaps * Remove async from describe in ActionManager test * Fabo/fetch policy (#3390) * set fetch policies correctly * fixed tests * changelog * coverage * remove cache invalidation handlers from delegation modals * switch to default fetch-policy to cache-and-network * linted * always requery data on incomming tx on delegation modal * reload balance on open in delegation modal * fix data undefined * fix delegation modal test * refetch delegations in undelegation modal * coverage * fix test Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Jordan/show on ledger (#3401) * fixed inconsistent styling issue with "show on ledger" button * only show the button when signed in with a ledger and not on mobile * changelog * delete only (#3406) * Fabo/add emoney account creation (#3404) * handle emoney account creation * changelog * Ana/handle blocks links according to explorer feature (#3411) * handle blocks links according to explorer feature * changelog * added vue-jest * cach bust deps Co-authored-by: Fabian <frznhope@gmail.com> * Ana/fix waiting for extension button (#3413) * fix waiting for extension button * changelog * update snapshot * fix root of the issue * Ana/emoney sendmodal multiple denoms (#3370) * first changes * working for first balance in array * allow selecting token. add selected balance. * fix validation selectedToken * make compatible with the one token networks * make compatible for all networks. styling * simplify code * fix validations * update snapshot * sendmodal fix test and update snapshot * add tests * change position. set amount to 0 in each selection * fix first load. styling * update snapshot * remove ellipsis from form * bust dep cache * added vue-jest * update snapshot * changelog Co-authored-by: Fabian <frznhope@gmail.com> * Ana/fix signout fault (#3417) * fix signout fault * changelog * workshop on jest please * fix appmenu test * fix all tests * handle sign out on network switch correctly Co-authored-by: Fabian <frznhope@gmail.com> * Fabo/cross network ledger (#3338) * basis for cross network account creation * cleanup and refactor * changelog * cleanup * approach for cross network ledger usage * steps towards having ledger corss network * linted * fix ledger account creation * linted * tests * changelog * fixed keystore tests * fixed signup test * added some tests * added shallow test for show address for coverage * test for clearing warnings in appmenu for show address * added back emoney * Fabo/add script to add intercom keys (#3418) * add script to add intercom keys * changelog * Fabo/fixed balances not available (#3420) * fixed balances not available * changelog * fixed test * Enable Intercom in mobile apps (#3419) * Mobile Intercom * changelog * Cleanup, fix tests * Use emit * Use platform specific capacitor config files * Implement mobile Intercom using vuex store (#3424) * Intercom mobile implemented using vuex store * changelog * Lint * Mutations * Fix test * Intercom store module testing * Better code coverage * Cleanup * Fix * Cleanup * Mock capacitor-intercom * Cleanup * Ana/multiple denoms in porfolio (missing better designs) (#3365) * add balance of various tokens * update snapshot * fix word misordering * try fix asynchrony * add currency selector * fix select currency. hack for placeholder * important fixes * update snapshot * changelog * getting things ready * fixes but totalfiatvalue query not triggered * all working * update snapshot * add test for new computed fields * adapt logic to recent changes * add getalldenoms test * travel to istanbul * delete usertransactionadded * add watch test * set eur as default selected fiat currency * Fabo/add x frame header (#3428) * add x frame header * changelog * added frame ancestor header * Refactor script to add Intercom api keys (#3426) * Refactor * Revert capacitor config mod * changelog * Aleksei/graphql parameter change (#3416) * added parameter to persist API url change * added parameter to persist API url change * changelog * refactor get graphql link * refactor get graphql link * fixed test * kill abbreviation Co-authored-by: Fabian <frznhope@gmail.com> * Fabo/allow to sign messages for Terra (#3421) * allow to sign messages for Terra * Update src/ActionModal/utils/MessageConstructor.js Co-Authored-By: Jordan Bibla <jbibla@gmail.com> * added more messages to terra * skip balance query if no denom known * refactor send modal * handle denoms when no balances * fix amount of undefined * fix selected index not checked correctly * changelog * fixed some tests * fixed sendmodal tests Co-authored-by: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Fabo/force refresh on index htm (#3433) * no caching for index.html * changelog * Fabo/emoney-signing (#3430) * allow to sign messages for Terra * Update src/ActionModal/utils/MessageConstructor.js Co-Authored-By: Jordan Bibla <jbibla@gmail.com> * added more messages to terra * skip balance query if no denom known * refactor send modal * handle denoms when no balances * fix amount of undefined * fix selected index not checked correctly * changelog * fixed some tests * fixed sendmodal tests * allow signing for emoney as well Co-authored-by: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * Fabo/fix transactions not displaying for terra (#3431) * only use messag suffix for transaction component detection * changelog * changelog * adjust old snaps * linted * Apply suggestions from code review Co-Authored-By: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Jordan Bibla <jbibla@gmail.com> * Ana/better multiple denoms porfolio version (#3434) * pyramid state * add scroll. scroll bar not showing * Update src/components/common/TmBalance.vue * switch ids for classes * Update TmBalance.vue * fixed tests * changelog Co-authored-by: Fabian <frznhope@gmail.com> * cleanup changes * fix release script * Fabo/fix single denom send modal (#3436) * set denom for single denom send * added test * changelog * release-1.0.159 Co-authored-by: Mario Pino <info@quequiereshacer.es> Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Jordan Bibla <jbibla@gmail.com> Co-authored-by: Col <colw@users.noreply.github.com> Co-authored-by: iambeone <iambeone@gmail.com>
Closes #ISSUE
Description:
I was looking through the Sentry errors and found one was due to an user trying to log in as an address starting with
cosmospub
. Here is the link to the error:This PR fixes similar future errors by improving the validation in the
TmSessionExplore
component.It is true that it seems that only the "cosmospub" addresses were missing, since I tried
cosmosvalcons
,cosmosvaloperpub
and so on and the validation forbech32
is enough in those other cases. Still, I added these other cases just to stay on the safe side and really make sure that users can only log in as regularcosmos1
addresses.Again, this is only cosmos focused and now that we will soon have
session
enabled for other networks maybe we need to tweak this a bit.Thank you! 🚀
For contributor:
yarn changelog
for a guided process.Files changed
in the github PR explorerFor reviewer: