Skip to content

Commit 948fa7c

Browse files
authored
Merge pull request #726 from syscoin/develop
optimize build + taproot support
2 parents 8c12c7f + 1554a20 commit 948fa7c

File tree

32 files changed

+918
-1478
lines changed

32 files changed

+918
-1478
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
[
44
"@babel/preset-env",
55
{
6-
"useBuiltIns": "usage",
7-
"corejs": 3,
6+
"useBuiltIns": false,
87
"modules": false,
98
"targets": {
109
"chrome": "88",

.cursor/cli.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Read(**)",
5+
"Shell(gh **)"
6+
],
7+
"deny": [
8+
"Shell(git push)",
9+
"Shell(gh pr create)",
10+
"Write(**)"
11+
]
12+
}
13+
}
14+
15+
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
7+
permissions:
8+
pull-requests: write
9+
contents: read
10+
issues: write
11+
12+
jobs:
13+
code-review:
14+
runs-on: ubuntu-latest
15+
# Skip automated code review for draft PRs
16+
if: github.event.pull_request.draft == false
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
ref: ${{ github.event.pull_request.head.sha }}
23+
24+
- name: Install Cursor CLI
25+
run: |
26+
curl https://cursor.com/install -fsS | bash
27+
echo "$HOME/.cursor/bin" >> $GITHUB_PATH
28+
29+
- name: Configure git identity
30+
run: |
31+
git config user.name "Cursor Agent"
32+
git config user.email "[email protected]"
33+
34+
- name: Perform automated code review
35+
env:
36+
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
37+
MODEL: gpt-5
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
BLOCKING_REVIEW: ${{ vars.BLOCKING_REVIEW || 'false' }}
40+
REVIEW_PROMPT: |
41+
You are operating in a GitHub Actions runner performing automated code review. The gh CLI is available and authenticated via GH_TOKEN. You may comment on pull requests.
42+
43+
Context:
44+
- Repo: ${{ github.repository }}
45+
- PR Number: ${{ github.event.pull_request.number }}
46+
- PR Head SHA: ${{ github.event.pull_request.head.sha }}
47+
- PR Base SHA: ${{ github.event.pull_request.base.sha }}
48+
- Blocking Review: ${{ env.BLOCKING_REVIEW }}
49+
50+
Objectives:
51+
1) Re-check existing review comments and reply resolved when addressed.
52+
2) Review the current PR diff and flag only clear, high-severity issues.
53+
3) Leave very short inline comments (1-2 sentences) on changed lines only and a brief summary at the end.
54+
55+
Procedure:
56+
- Get existing comments: gh pr view --json comments
57+
- Get diff: gh pr diff
58+
- Get changed files with patches to compute inline positions: gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files --paginate --jq '.[] | {filename,patch}'
59+
- Compute exact inline anchors for each issue (file path + diff position). Comments MUST be placed inline on the changed line in the diff, not as top-level comments.
60+
- Detect prior top-level "no issues" style comments authored by this bot (match bodies like: "✅ no issues", "No issues found", "LGTM").
61+
- If CURRENT run finds issues and any prior "no issues" comments exist:
62+
- Prefer to remove them to avoid confusion:
63+
- Try deleting top-level issue comments via: gh api -X DELETE repos/${{ github.repository }}/issues/comments/<comment_id>
64+
- If deletion isn't possible, minimize them via GraphQL (minimizeComment) or edit to prefix "[Superseded by new findings]".
65+
- If neither delete nor minimize is possible, reply to that comment: "⚠️ Superseded: issues were found in newer commits".
66+
- If a previously reported issue appears fixed by nearby changes, reply: ✅ This issue appears to be resolved by the recent changes
67+
- Analyze ONLY for:
68+
- Null/undefined dereferences
69+
- Resource leaks (unclosed files or connections)
70+
- Injection (SQL/XSS)
71+
- Concurrency/race conditions
72+
- Missing error handling for critical operations
73+
- Obvious logic errors with incorrect behavior
74+
- Clear performance anti-patterns with measurable impact
75+
- Definitive security vulnerabilities
76+
- Avoid duplicates: skip if similar feedback already exists on or near the same lines.
77+
78+
Commenting rules:
79+
- Max 10 inline comments total; prioritize the most critical issues
80+
- One issue per comment; place on the exact changed line
81+
- All issue comments MUST be inline (anchored to a file and line/position in the PR diff)
82+
- Natural tone, specific and actionable; do not mention automated or high-confidence
83+
- Use emojis: 🚨 Critical 🔒 Security ⚡ Performance ⚠️ Logic ✅ Resolved ✨ Improvement
84+
85+
Submission:
86+
- If there are NO issues to report and an existing top-level comment indicating "no issues" already exists (e.g., "✅ no issues", "No issues found", "LGTM"), do NOT submit another comment. Skip submission to avoid redundancy.
87+
- If there are NO issues to report and NO prior "no issues" comment exists, submit one brief summary comment noting no issues.
88+
- If there ARE issues to report and a prior "no issues" comment exists, ensure that prior comment is deleted/minimized/marked as superseded before submitting the new review.
89+
- If there ARE issues to report, submit ONE review containing ONLY inline comments plus an optional concise summary body. Use the GitHub Reviews API to ensure comments are inline:
90+
- Build a JSON array of comments like: [{ "path": "<file>", "position": <diff_position>, "body": "..." }]
91+
- Submit via: gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews -f event=COMMENT -f body="$SUMMARY" -f comments='[$COMMENTS_JSON]'
92+
- Do NOT use: gh pr review --approve or --request-changes
93+
94+
Blocking behavior:
95+
- If BLOCKING_REVIEW is true and any 🚨 or 🔒 issues were posted: echo "CRITICAL_ISSUES_FOUND=true" >> $GITHUB_ENV
96+
- Otherwise: echo "CRITICAL_ISSUES_FOUND=false" >> $GITHUB_ENV
97+
- Always set CRITICAL_ISSUES_FOUND at the end
98+
run: |
99+
cursor-agent --force --model "$MODEL" --output-format=text --print "$REVIEW_PROMPT"
100+
101+
- name: Check blocking review results
102+
if: env.BLOCKING_REVIEW == 'true'
103+
run: |
104+
echo "Checking for critical issues..."
105+
echo "CRITICAL_ISSUES_FOUND: ${CRITICAL_ISSUES_FOUND:-unset}"
106+
107+
if [ "${CRITICAL_ISSUES_FOUND:-false}" = "true" ]; then
108+
echo "❌ Critical issues found and blocking review is enabled. Failing the workflow."
109+
exit 1
110+
else
111+
echo "✅ No blocking issues found."
112+
fi
113+
114+

package.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,20 @@
6363
"@heroicons/react": "^1.0.6",
6464
"@reduxjs/toolkit": "^2.8.2",
6565
"@sidhujag/sysweb3-core": "^1.0.27",
66-
"@sidhujag/sysweb3-keyring": "^1.0.533",
67-
"@sidhujag/sysweb3-network": "^1.0.105",
68-
"@sidhujag/sysweb3-utils": "^1.1.256",
66+
"@sidhujag/sysweb3-keyring": "^1.0.561",
67+
"@sidhujag/sysweb3-network": "^1.0.106",
68+
"@sidhujag/sysweb3-utils": "^1.1.271",
6969
"@tippyjs/react": "^4.2.6",
7070
"@types/chrome": "^0.0.270",
7171
"@types/jest": "^29.5.0",
7272
"@typescript-eslint/eslint-plugin": "^7.18.0",
7373
"antd": "^4.24.15",
74-
"autoprefixer": "^10.4.20",
7574
"axios": "^1.7.9",
7675
"bignumber.js": "^9.1.2",
77-
"core-js": "^3.39.0",
7876
"currency-symbol-map": "^5.1.0",
7977
"currency.js": "^2.0.4",
80-
"date-fns": "^2.29.3",
78+
"date-fns": "^2.30.0",
8179
"dotenv": "^16.4.7",
82-
"elliptic": "^6.5.7",
83-
"emoji-log": "^1.0.2",
8480
"eslint-config-prettier": "^8.10.0",
8581
"eslint-plugin-import": "^2.23.3",
8682
"ethereum-input-data-decoder": "^0.4.1",
@@ -90,9 +86,7 @@
9086
"jdenticon": "^3.3.0",
9187
"jest": "^29.7.0",
9288
"jest-chrome": "^0.8.0",
93-
"lint-staged": "^12.5.0",
9489
"lodash": "^4.17.21",
95-
"process": "^0.11.10",
9690
"qrcode.react": "^3.1.0",
9791
"react": "^18.3.1",
9892
"react-dom": "^18.3.1",
@@ -102,14 +96,12 @@
10296
"react-router-dom": "^6.28.0",
10397
"react-toastify": "^10.0.6",
10498
"redux": "^5.0.1",
105-
"redux-logger": "^3.0.6",
10699
"redux-thunk": "^3.1.0",
107100
"sass": "^1.80.7",
108-
"syscoinjs-lib": "^1.0.255",
101+
"syscoinjs-lib": "^1.0.267",
109102
"tailwindcss": "^3.4.15",
110103
"tippy.js": "^6.3.7",
111104
"uuid": "^9.0.1",
112-
"ws": "^8.17.1",
113105
"zip-webpack-plugin": "^4.0.3"
114106
},
115107
"devDependencies": {
@@ -151,6 +143,7 @@
151143
"html-webpack-plugin": "^5.6.3",
152144
"husky": "^8.0.3",
153145
"identity-obj-proxy": "^3.0.0",
146+
"lint-staged": "^12.5.0",
154147
"mini-css-extract-plugin": "^2.9.2",
155148
"node-polyfill-webpack-plugin": "^2.0.1",
156149
"patch-package": "^8.0.0",

source/assets/locales/de.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"importWalletWarning": "WALLET-IMPORT-WARNUNG!",
199199
"thisActionErases": "Diese Aktion löscht Ihre aktuelle Wallet.",
200200
"toRestoreThis": "Um diese aktuelle Wallet in Zukunft wiederherzustellen, stellen Sie sicher, dass Sie die Wiederherstellungsphrase haben.",
201-
"allYourSettings": "Alle Ihre Einstellungen, wie benutzerdefinierte Token und importierte Konten, gehen verloren, jedoch sind Ihre Gelder sicher!",
201+
"allYourSettings": "Alle Einstellungen auf diesem Gerät (benutzerdefinierte Token und importierte Konten) werden entfernt. Dies verschiebt oder löscht keine On-Chain-Gelder, aber die verschlüsselten privaten Schlüssel für importierte Konten werden von diesem Gerät gelöscht. Wenn Sie die Secret Recovery Phrase oder diese privaten Schlüssel nicht besitzen, können Sie den Zugriff auf diese Vermögenswerte dauerhaft verlieren.",
202202
"removeAccount": "Konto entfernen",
203203
"removeAccountConfirmation": "Sind Sie sicher, dass Sie das {{accountType}}-Konto \"{{accountName}}\" entfernen möchten? Sie können das Konto bei Bedarf jederzeit neu erstellen.",
204204
"accountRemovedSuccessfully": "Konto erfolgreich entfernt",
@@ -214,8 +214,7 @@
214214
"closeAndReopenPali": "Schließen Sie dieses Fenster und öffnen Sie Pali erneut, um sich zu authentifizieren und Ihre Hardware-Wallet zu verbinden",
215215
"activeAccountNotFound": "Fehler: Aktives Konto nicht gefunden",
216216
"paliWalletBrowserExtension": "Pali Wallet Browser-Erweiterung",
217-
"addressType": "Adresstyp",
218-
"taprootDisabled": "Taproot-Signierung bald verfügbar"
217+
"addressType": "Adresstyp"
219218
},
220219
"components": {
221220
"newPassword": "Neues Passwort (min. 8 Zeichen)",

source/assets/locales/en.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@
516516
"importWalletWarning": "IMPORT WALLET WARNING!",
517517
"thisActionErases": "This action erases your current wallet.",
518518
"toRestoreThis": "To restore this current wallet in the future ensure you have the recovery phrase.",
519-
"allYourSettings": "All your settings, like custom tokens and imported accounts, will get lost, however, your funds it's saved!",
519+
"allYourSettings": "All settings on this device (custom tokens and imported accounts) will be removed. This does not move or delete on-chain funds, but the encrypted private keys for imported accounts will be erased from this device. If you do not have the Secret Recovery Phrase or those private keys, you may permanently lose access to those assets.",
520520
"removeAccount": "Remove Account",
521521
"removeAccountConfirmation": "Are you sure you want to remove the {{accountType}} account \"{{accountName}}\"? You can always recreate the account later if needed.",
522522
"accountRemovedSuccessfully": "Account removed successfully",
@@ -532,8 +532,7 @@
532532
"closeAndReopenPali": "Close this window and reopen Pali to authenticate and connect your hardware wallet",
533533
"activeAccountNotFound": "Error: Active account not found",
534534
"paliWalletBrowserExtension": "Pali Wallet Browser Extension",
535-
"addressType": "Address type",
536-
"taprootDisabled": "Taproot signing coming soon"
535+
"addressType": "Address type"
537536
},
538537
"start": {
539538
"paliDoesnt": "Pali doesn't store your password. Regaining access requires a wallet reset with your Secret Recovery Phrase. This action erases the current wallet, created accounts, custom tokens, and imported accounts from your device, generating a new account tied to the reset phrase.",

source/assets/locales/es.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@
516516
"importWalletWarning": "¡ADVERTENCIA DE IMPORTACIÓN DE MONEDERO!",
517517
"thisActionErases": "Esta acción borra tu monedero actual.",
518518
"toRestoreThis": "Para restaurar este monedero actual en el futuro, asegúrate de tener la frase de recuperación.",
519-
"allYourSettings": "Todas tus configuraciones, como tokens personalizados y cuentas importadas, se perderán, sin embargo, ¡tus fondos están seguros!",
519+
"allYourSettings": "Todos los ajustes en este dispositivo (tokens personalizados y cuentas importadas) serán eliminados. Esto no mueve ni elimina fondos en la cadena, pero las claves privadas cifradas de las cuentas importadas se borrarán de este dispositivo. Si no tienes la Frase de Recuperación Secreta o esas claves privadas, podrías perder el acceso a esos activos de forma permanente.",
520520
"removeAccount": "Eliminar cuenta",
521521
"removeAccountConfirmation": "¿Estás seguro de que deseas eliminar la cuenta {{accountType}} \"{{accountName}}\"? Siempre puedes recrear la cuenta más tarde si es necesario.",
522522
"accountRemovedSuccessfully": "Cuenta eliminada exitosamente",
@@ -532,8 +532,7 @@
532532
"closeAndReopenPali": "Cierre esta ventana y reabra Pali para autenticarse y conectar su billetera de hardware",
533533
"activeAccountNotFound": "Error: Cuenta activa no encontrada",
534534
"paliWalletBrowserExtension": "Extensión del Navegador Pali Wallet",
535-
"addressType": "Tipo de dirección",
536-
"taprootDisabled": "La firma Taproot estará disponible pronto"
535+
"addressType": "Tipo de dirección"
537536
},
538537
"start": {
539538
"paliDoesnt": "Pali no guarda tu contraseña. Recuperar el acceso requiere un reinicio de la billetera con tu Frase Secreta de Recuperación. Esta acción borra la billetera actual, las cuentas creadas, tokens personalizados y cuentas importadas de tu dispositivo, generando una nueva cuenta vinculada a la frase de reinicio.",

source/assets/locales/fr.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"importWalletWarning": "AVERTISSEMENT D'IMPORTATION DE PORTEFEUILLE !",
199199
"thisActionErases": "Cette action efface votre portefeuille actuel.",
200200
"toRestoreThis": "Pour restaurer ce portefeuille actuel à l'avenir, assurez-vous d'avoir la phrase de récupération.",
201-
"allYourSettings": "Tous vos paramètres, comme les jetons personnalisés et les comptes importés, seront perdus, cependant, vos fonds sont sauvegardés !",
201+
"allYourSettings": "Tous les paramètres sur cet appareil (jetons personnalisés et comptes importés) seront supprimés. Cela ne déplace ni ne supprime les fonds on-chain, mais les clés privées chiffrées des comptes importés seront effacées de cet appareil. Sans la phrase de récupération secrète ou ces clés privées, vous pourriez perdre définitivement l'accès à ces actifs.",
202202
"removeAccount": "Supprimer le compte",
203203
"removeAccountConfirmation": "Êtes-vous sûr de vouloir supprimer le compte {{accountType}} \"{{accountName}}\" ? Vous pouvez toujours recréer le compte plus tard si nécessaire.",
204204
"accountRemovedSuccessfully": "Compte supprimé avec succès",
@@ -214,8 +214,7 @@
214214
"closeAndReopenPali": "Fermez cette fenêtre et rouvrez Pali pour vous authentifier et connecter votre portefeuille matériel",
215215
"activeAccountNotFound": "Erreur: Compte actif non trouvé",
216216
"paliWalletBrowserExtension": "Extension de Navigateur Pali Wallet",
217-
"addressType": "Type d'adresse",
218-
"taprootDisabled": "Signature Taproot bientôt disponible"
217+
"addressType": "Type d'adresse"
219218
},
220219
"components": {
221220
"newPassword": "Nouveau mot de passe (8 caractères min.)",

source/assets/locales/ja.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"importWalletWarning": "ウォレットインポート警告!",
199199
"thisActionErases": "このアクションは現在のウォレットを消去します。",
200200
"toRestoreThis": "将来この現在のウォレットを復元するには、リカバリーフレーズがあることを確認してください。",
201-
"allYourSettings": "カスタムトークンやインポートされたアカウントなど、すべての設定が失われますが、資金は安全です!",
201+
"allYourSettings": "このデバイス上のすべての設定(カスタムトークンおよびインポートしたアカウント)は削除されます。オンチェーンの資産が移動または削除されることはありませんが、インポートしたアカウントの暗号化された秘密鍵はこのデバイスから消去されます。シークレットリカバリーフレーズやその秘密鍵がない場合、これらの資産へのアクセスを永久に失う可能性があります。",
202202
"removeAccount": "アカウントを削除",
203203
"removeAccountConfirmation": "{{accountType}}アカウント \"{{accountName}}\" を削除してもよろしいですか?必要に応じて、いつでもアカウントを再作成できます。",
204204
"accountRemovedSuccessfully": "アカウントが正常に削除されました",
@@ -214,8 +214,7 @@
214214
"closeAndReopenPali": "このウィンドウを閉じてPaliを再度開き、認証してハードウェアウォレットを接続してください",
215215
"activeAccountNotFound": "エラー:アクティブなアカウントが見つかりません",
216216
"paliWalletBrowserExtension": "Pali Walletブラウザ拡張機能",
217-
"addressType": "アドレスタイプ",
218-
"taprootDisabled": "Taproot 署名は近日対応"
217+
"addressType": "アドレスタイプ"
219218
},
220219
"components": {
221220
"newPassword": "新しいパスワード(最低8文字)",

source/assets/locales/ko.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"importWalletWarning": "지갑 가져오기 경고!",
199199
"thisActionErases": "이 작업은 현재 지갑을 지웁니다.",
200200
"toRestoreThis": "향후 이 현재 지갑을 복원하려면 복구 구문이 있는지 확인하세요.",
201-
"allYourSettings": "사용자 정의 토큰 및 가져온 계정과 같은 모든 설정이 손실되지만 자금은 안전합니다!",
201+
"allYourSettings": "이 기기의 모든 설정(사용자 지정 토큰 및 가져온 계정)이 삭제됩니다. 이는 온체인 자금을 이동하거나 삭제하지 않지만, 가져온 계정의 암호화된 개인 키는 이 기기에서 삭제됩니다. 시크릿 복구 구문 또는 해당 개인 키가 없으면 해당 자산에 대한 접근을 영구적으로 잃을 수 있습니다.",
202202
"removeAccount": "계정 제거",
203203
"removeAccountConfirmation": "{{accountType}} 계정 \"{{accountName}}\"을(를) 제거하시겠습니까? 필요하면 언제든지 계정을 다시 만들 수 있습니다.",
204204
"accountRemovedSuccessfully": "계정이 성공적으로 제거되었습니다",
@@ -214,8 +214,7 @@
214214
"closeAndReopenPali": "이 창을 닫고 Pali를 다시 열어서 인증하고 하드웨어 지갑을 연결하세요",
215215
"activeAccountNotFound": "오류: 활성 계정을 찾을 수 없습니다",
216216
"paliWalletBrowserExtension": "Pali Wallet 브라우저 확장",
217-
"addressType": "주소 유형",
218-
"taprootDisabled": "Taproot 서명은 곧 지원됩니다"
217+
"addressType": "주소 유형"
219218
},
220219
"components": {
221220
"newPassword": "새 비밀번호 (최소 8자)",

0 commit comments

Comments
 (0)