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

Firefly PC v5.2.0 #11610

Draft
wants to merge 22 commits into
base: develop
Choose a base branch
from
Draft

Firefly PC v5.2.0 #11610

wants to merge 22 commits into from

Conversation

guanbinrui
Copy link
Member

@guanbinrui guanbinrui commented May 10, 2024

  • feat: add getOwnersByContract api

  • feat: adjust getOwnersByContract params cursor

Description

Closes MF-0000

Type of change

  • Documentation
  • Code refactoring (Restructuring existing code w/o changing its observable behavior)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (a fix or feature that would make something no longer possible to do/require old user must upgrade their Mask Network to this new version)

Previews

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
    • I have removed all in development console.logs
    • I have removed all commented code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have read Internationalization Guide and moved text fields to the i18n JSON file.

If this PR depends on external APIs:

  • I have configured those APIs with CORS headers to let extension requests get passed.
    • chrome extension: chrome-extension://[id]
    • firefox extension: moz-extension://[id]
  • I have delegated all web requests to the background service via the internal RPC bridge.

* feat: add `getOwnersByContract` api

* feat: adjust `getOwnersByContract` params `cursor`
@guanbinrui guanbinrui added this to the 2.25.0 milestone May 10, 2024
@guanbinrui guanbinrui changed the title feat: add getOwnersByContract api (#11609) Firefly PC 5.2 May 10, 2024
@guanbinrui guanbinrui changed the title Firefly PC 5.2 Firefly PC v5.2.0 May 10, 2024
@@ -10,7 +10,7 @@

export function getCommunityLink(links: string[]): TrendingAPI.CommunityUrls {
return links.map((x) => {
if (x.includes('twitter')) return { type: 'twitter', link: x }
if (x.includes('twitter') || x.includes('x.com')) return { type: 'twitter', link: x }

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

'
x.com
' can be anywhere in the URL, and arbitrary hosts may come before or after it.
Copy link
Member

Choose a reason for hiding this comment

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

@guanbinrui @swkatmask you must use this

import { isDomainOrSubdomainOf } from '@masknet/shared-base'

if (isDomainOrSubdomainOf(x, 'x.com')) return { type: 'twitter', link: x }

otherwise, v2ex.com also passes this test.

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.

None yet

4 participants