Skip to content
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

Feature/token allowlist #1115

Merged
merged 5 commits into from
Feb 14, 2024
Merged

Feature/token allowlist #1115

merged 5 commits into from
Feb 14, 2024

Conversation

piyalbasu
Copy link
Contributor

@piyalbasu piyalbasu commented Feb 14, 2024

Screenshot 2024-02-14 at 2 14 01 PM

Copy link

socket-security bot commented Feb 14, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@stellar-asset-lists/sdk@1.0.0 network 0 14.3 kB orbitlens

View full report↗︎

Copy link

socket-security bot commented Feb 14, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Network access npm/@stellar-asset-lists/sdk@1.0.0

View full report↗︎

Next steps

What is network access?

This module accesses the network.

Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/@stellar-asset-lists/sdk@1.0.0

type="button"
data-testid="ManageAssetRowButton"
>
{isTrustlineActive ? (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this still be isTrustlineActive || isContract?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good callout. I actually refactored isTrustlineActive up above to include all assets in balances (classic or token) and tokensWithNoBalance, so this should cover all asset/tokens a user has associated with their account. (at least in my testing it does 😬 )

<div className="UnverifiedTokenWarning__description__icon">
<Icon.VerifiedUser />
</div>
<div className="UnverifiedTokenWarning__description__text">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we show this even when adding a Soroban token? My thought here is that they don't have trustlines so maybe this inly belongs on classic assets or SACs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, we would show this if a user is adding a contract ID that doesn't appear on this list:
https://api.stellar.expert/explorer/testnet/asset-list/top50

So we just flag that a user is adding a contract ID that has not been vetted

Lmk if that answers your question!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I was mainly curious if the badge could be confused with the concept of having a trustline to a classic asset. As in this case we're "trusting" the asset by means of it being on the list which is different than having a trust line on the classic asset side.

@piyalbasu piyalbasu merged commit b6213fa into release/5.16.0 Feb 14, 2024
2 of 3 checks passed
@piyalbasu piyalbasu deleted the feature/token-allowlist branch February 14, 2024 23:09
piyalbasu added a commit that referenced this pull request Feb 16, 2024
* refactors set allowed flow for new preview designs

* adds Tabs component and first pass at summary preview tab

* first pass at preview detail tab

* first pass at data tab

* Added translations

* adds auth review route and component, wip auth review details

* organizes auth review details, adds auth review signing, adds account selection back

* Added translations

* adds warnings back, updates warning style and tweaks dimensions to fit window

* adds warnings back, updates warning style and tweaks dimensions to fit window

* refactors invocation tree renderer to display key vals instead of tree

* Added translations

* cleans up dupe import

* accounts for FeeBump tx, and account verification

* tweak warning modal container styles

* replaces missing icons, tweaks grant domain overflow, cleans up unused imports

* fixes import order in preview tabs, adds memo into summary

* removes unused TransactionInfo component, uses pubkey KeyVal in some missing spots, adds better predicate renderer for claimants

* Added translations

* use correct logic to step through auth entry review

* show root invocation in details instead of stacked auth entry invocations

* Feature/token allowlist (#1115)

* adding warning message to unverified tokens

* Added translations

* don't error on Freighter BE sending malformed response

* fix issue removing token with no balance (#1117)

* updates copy on GrantAccess and auth entry continue button

* Bugfix/add verified warnings (#1119)

* add verified warnings and update copy

* Added translations

* Added translations

* update border color for default warning

* small style update

---------

Co-authored-by: Aristides Staffieri <aristides.staffieri@stellar.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants