Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output
coverage

.eslintrc.js
jest.config.js
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
};

38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'Type: Bug'
assignees: catenocrypt

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'Type: New Feature'
assignees: catenocrypt

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Question
about: Any questions related to this repo
title: ''
labels: 'Type: Question'
assignees: ''

---

## How can we help ?

<!-- Short, concise description of the proposed feature -->
55 changes: 55 additions & 0 deletions .github/merge-fee-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Expected Payment. Can be more than one options.
payments:
- amount: 1000
token: TWT
address: bnb1tqq9llyr3dyjd559dha6z5r5etk3qfwk07m098
- amount: 5
token: BNB
address: bnb1tqq9llyr3dyjd559dha6z5r5etk3qfwk07m098
payment:
# The tolerance for slightly lower amount, in percentage. Valid range: 95 -- 100
amountTolerancePct: 96
# Message templates
message:
initial: |
Hi! In order to compensate for the efforts of processing PRs, we kindly ask for a contribution.
💀 As **there is no refund**, before **paying the fee**, make sure **new tokens fulfill the minimum circulation and other [acceptance criteria](https://community.trustwallet.com/t/how-to-submit-a-token-logo/3863)**.
See also the [PR Fee FAQ](https://developer.trustwallet.com/add_new_asset/pr-fee).
\nPlease pay **$PAY1_AMOUNT $PAY1_CURRENCY** with the memo **$PAY1_MEMO** to the address `$PAY1_ADDRESS`.
Alternatively, $PAY2_AMOUNT $PAY2_CURRENCY is also accepted (same memo & address).
\n$QR1_SIMPLE
\n*Notes*:
* [Trust Wallet Tokens (TWT)](https://community.trustwallet.com/t/trust-wallet-token-twt/4187) can be obtained through our [Referral Program](https://community.trustwallet.com/t/invite-a-friend-earn-trust-wallet-token-twt/4125) or [from DEXs/exchanges](https://community.trustwallet.com/t/where-to-get-trust-wallet-tokens/76641).
* New tokens without significant usage are rejected, see criteria mentioned above.
* One PR should be for a single project; PR's with more than 10 logos will be rejected.
* Payment evaluation happens automatically, but with a few minutes delay. When payment is detected, an Accept Review is automatically placed on the PR, which is a condition for merge.
* Evaluating the PR is done manually, and it is merged only if all conditions are satisfied.
* TWT-BEP2 is supported (Binance Chain), TWT-BEP20 version on Smart Chain is not.
notReceived: Fee has not been received yet (or not fully).\n\n$TX_LIST
received: |
Fee is PAID, fantastic! Thanks!
\nThe PR will be evaluated soon by a maintainer, and if merged, the new logos should be visible in Trust Wallet.
Please note that the app caches logos (up to several days; if you want to see changes immediately, use a new installation). See the [assets FAQ](https://github.com/trustwallet/assets#faq).
(@zachzwei, @Cryptocool1: please take note.)
\n([$PAID_AMOUNT $PAID_CURRENCY]($PAID1_EXPLORERLINK))
reviewCreated: Fee paid, review added.
reviewed: Review is not needed any more, no more fee required.
reminder: |
$USER, kind reminder: please pay fee: **$PAY1_AMOUNT $PAY1_CURRENCY** with the memo **$PAY1_MEMO** to the address `$PAY1_ADDRESS`.
Alternatively, $PAY2_AMOUNT $PAY2_CURRENCY is also accepted (same memo & address).
\n$QR1_SIMPLE
See the [Pull Request Fee FAQ](https://developer.trustwallet.com/add_new_asset/pr-fee).
oldClosing: |
This PR is being closed due to inactivity. If you wish to continue, please have us reopen the PR before sending your payment, or just create a new one.
Do NOT send payments for closed PR, as the fee may by lost!
label:
requested: 'Payment Status: Requested'
paid: 'Payment Status: Paid'
user:
assignOnPay: zachzwei,Cryptocool1,cryptomanz
# if set to 1 comments from not allowed users are deleted. Only comments from the PR creator or collaborators are allowed
deleteComments: 1
collaborators: zachzwei,Iamdeadlyz,catenocrypt,vikmeup,hewigovens,Cryptocool1,cryptomanz,ramsty
timeout:
maxAgeCloseHours: 48
maxIdleRemindHours: 22
16 changes: 16 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 1
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 2
# Issues with these labels will never be considered stale
exemptLabels:
- 'Payment Status: Paid'
- pinned
- security
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
21 changes: 21 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Dependencies
run: npm ci
- name: Run check
run: npm run check
- name: Run test
run: npm t
- name: Run lint
run: npm run lint
24 changes: 24 additions & 0 deletions .github/workflows/fix-dryrun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Fixes (sanity and consistency) - Dry run
on:
pull_request:
branches: [master]
jobs:
fix-all-dryrun:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Dependencies
run: npm ci
- name: Run fix script
run: npm run fix
- name: Show fix result (diff); run 'npm run fix' locally
run: |
git status
git diff
- name: Run check
run: npm run check
- name: Run test
run: npm t
55 changes: 55 additions & 0 deletions .github/workflows/fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Fixes
# Runs on:
# - on master branch of trustwallet repo: fix, checkin
# - on other branch of trustwallet repo: fix, checkin
# - on fork repos: fix-sanity only
on:
push:
branches:
- 'master'
- '*'
workflow_dispatch:
jobs:
fix-all:
runs-on: ubuntu-latest
steps:
- name: Checkout (trustwallet repo, secret token)
if: github.repository_owner == 'trustwallet'
uses: actions/checkout@v2
with:
token: ${{ secrets.COMMIT_TOKEN }}
ref: ${{ github.ref }}
- name: Checkout (fork repo, default token)
if: github.repository_owner != 'trustwallet'
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.ref }}
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Dependencies
run: npm ci
- name: Run fix script (trustwallet repo, sanity and consistency)
if: github.repository_owner == 'trustwallet'
run: npm run fix
- name: Run fix-sanity script (fork repo, sanity only)
if: github.repository_owner != 'trustwallet'
run: npm run fix-sanity
- name: Debug
run: echo "GITHUB_REF " $GITHUB_REF " GITHUB_BASE_REF " $GITHUB_BASE_REF
- name: Show result (diff) (run 'npm run fix' locally)
run: |
git status
git diff
- name: Run check
run: npm run check
- name: Run test
run: npm t
- name: Commit changes
if: success()
uses: stefanzweifel/git-auto-commit-action@v4.1.2
with:
commit_user_name: trust-wallet-merge-bot
commit_user_email: mergebot@trustwallet.com
commit_message: Fixes (sanity and consistency, auto)
37 changes: 37 additions & 0 deletions .github/workflows/periodic-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Periodic External Update
on:
schedule:
# Run twice per day (at 1:00UTC/6pmPST, 13:00UTC/6amPST)
- cron: '0 1,13 * * *'
workflow_dispatch:
jobs:
periodic-auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.COMMIT_TOKEN }}
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Dependencies
run: npm ci
- name: Run scripts
run: npm run updateAuto
- name: Show update result (diff)
if: success()
run: |
git status
git diff
- name: Run check
run: npm run check
- name: Run test
run: npm t
- name: Commit changes
if: success()
uses: stefanzweifel/git-auto-commit-action@v4.1.2
with:
commit_user_name: trust-wallet-merge-bot
commit_user_email: mergebot@trustwallet.com
commit_message: External Updates
24 changes: 24 additions & 0 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull Request CI
on:
push:
branches:
- '*'
- '!master'
pull_request:
branches: [master]
workflow_dispatch:
jobs:
pull_request_ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: bahmutov/npm-install@v1
- name: Run check (sanity only)
run: npm run check-sanity
- name: Run test
run: npm t
- name: Run lint
run: npm run lint
21 changes: 21 additions & 0 deletions .github/workflows/s3_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Upload S3
on:
push:
branches:
- master
workflow_dispatch:
jobs:
upload-s3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Upload (from main repo only)
if: github.repository_owner == 'trustwallet'
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete --exclude '*' --include 'dapps/*' --include 'blockchains/*' --include 'history/*' --size-only
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
23 changes: 23 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Security Review

permissions:
pull-requests: write
contents: read

on:
pull_request:

jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 2

- uses: Portkey-Wallet/claude-code-security-review@main
with:
comment-pr: true
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
run-every-commit: true
Loading