diff --git a/.vscode/settings.json b/.vscode/settings.json
index 257b034..e17a21f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,5 +1,5 @@
{
"cSpell.words": [
- "zano"
+ "lethean"
]
}
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..99ae795
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,24 @@
+# Build-only: produces the Chrome extension bundle via webpack
+# The local dep lethean_web3 (file:../zano_web3) must be pre-built
+FROM node:22-alpine AS builder
+
+WORKDIR /workspace
+
+# Build the lethean_web3 dependency first
+COPY zano_web3/package.json zano_web3/package-lock.json ./zano_web3/
+RUN cd zano_web3 && npm ci
+
+COPY zano_web3/ ./zano_web3/
+RUN cd zano_web3 && npm run build
+
+# Now build the extension
+COPY zano-extension/package.json zano-extension/package-lock.json ./zano-extension/
+RUN cd zano-extension && npm ci
+
+COPY zano-extension/ ./zano-extension/
+RUN cd zano-extension && npm run build
+
+# Export stage: only the built extension artefact
+FROM scratch AS export
+
+COPY --from=builder /workspace/zano-extension/build /build
diff --git a/README.md b/README.md
index 6f1b2d9..f2aa06e 100644
--- a/README.md
+++ b/README.md
@@ -1,25 +1,25 @@
-# Zano Companion
+# Lethean Companion
-Zano Companion is a browser extension that enhances your experience with Zano-based dApps by providing seamless wallet integration, transaction signing, and more.
+Lethean Companion is a browser extension that enhances your experience with Lethean-based dApps by providing seamless wallet integration, transaction signing, and more.
## Features
-- Connect your Zano wallet to web applications securely.
+- Connect your Lethean wallet to web applications securely.
- Sign transactions and messages directly from the extension.
- Easily access your balance and transaction history.
-- Compatible with dApps in the Zano ecosystem.
+- Compatible with dApps in the Lethean ecosystem.
## Installation
### Chrome Web Store
-Install Zano Companion from the [Chrome Web Store](https://chromewebstore.google.com/detail/zano-companion/akcgnllhhhkcpmlenfpicmcpgfpindlb)
+Install Lethean Companion from the Chrome Web Store.
### Manual Installation
If you prefer to install manually:
-- Download the latest release from [GitHub Releases](https://github.com/hyle-team/zano-extension/releases).
+- Download the latest release from [GitHub Releases](https://github.com/lethean-io/lethean-extension/releases).
- Extract the archive.
- Open Chrome and navigate to chrome://extensions/.
- Enable Developer mode (top-right corner).
@@ -27,7 +27,7 @@ If you prefer to install manually:
## Usage
-Open the extension and connect your Zano wallet.
+Open the extension and connect your Lethean wallet.
Approve connection requests from supported dApps.
Sign transactions securely.
diff --git a/package-lock.json b/package-lock.json
index 63b4a9d..7c2ddc1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,11 +1,11 @@
{
- "name": "zano-extension",
+ "name": "lethean-extension",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "zano-extension",
+ "name": "lethean-extension",
"version": "0.1.0",
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
@@ -18,14 +18,14 @@
"decimal.js": "^10.4.3",
"dompurify": "^3.3.1",
"json-bigint": "^1.0.0",
+ "lethean_web3": "file:../zano_web3",
"node-forge": "^1.3.2",
"react": "^18.2.0",
"react-chrome-extension-router": "^1.4.0",
"react-dom": "^18.2.0",
"react-id-generator": "^3.0.2",
"sha256": "^0.2.0",
- "web-vitals": "^2.1.4",
- "zano_web3": "^9.2.2"
+ "web-vitals": "^2.1.4"
},
"devDependencies": {
"@babel/cli": "^7.21.0",
@@ -66,6 +66,25 @@
"webpack-merge": "^5.8.0"
}
},
+ "../zano_web3": {
+ "name": "lethean_web3",
+ "version": "9.2.2",
+ "license": "ISC",
+ "dependencies": {
+ "@types/big.js": "^6.2.2",
+ "@types/node": "^20.14.12",
+ "@types/node-forge": "^1.3.11",
+ "@types/react": "^18.3.3",
+ "@types/uuid": "^10.0.0",
+ "axios": "^1.7.2",
+ "big.js": "^6.2.1",
+ "decimal.js": "^10.4.3",
+ "node-forge": "^1.3.1",
+ "react": "^18.3.1",
+ "typescript": "^5.5.4",
+ "uuid": "^10.0.0"
+ }
+ },
"node_modules/@adobe/css-tools": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.4.tgz",
@@ -4125,6 +4144,7 @@
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-6.2.2.tgz",
"integrity": "sha512-e2cOW9YlVzFY2iScnGBBkplKsrn2CsObHQ2Hiw4V1sSyiGbgWL8IyqE3zFi1Pt5o1pdAtYkDAIsF3KKUPjdzaA==",
+ "dev": true,
"license": "MIT"
},
"node_modules/@types/body-parser": {
@@ -4393,6 +4413,7 @@
"version": "1.3.11",
"resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz",
"integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
@@ -4530,12 +4551,6 @@
"devOptional": true,
"license": "MIT"
},
- "node_modules/@types/uuid": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz",
- "integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==",
- "license": "MIT"
- },
"node_modules/@types/ws": {
"version": "8.18.1",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
@@ -5499,7 +5514,8 @@
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "dev": true
},
"node_modules/at-least-node": {
"version": "1.0.0",
@@ -5568,33 +5584,6 @@
"node": ">=4"
}
},
- "node_modules/axios": {
- "version": "1.13.5",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz",
- "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
- "license": "MIT",
- "dependencies": {
- "follow-redirects": "^1.15.11",
- "form-data": "^4.0.5",
- "proxy-from-env": "^1.1.0"
- }
- },
- "node_modules/axios/node_modules/form-data": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
- "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
- "license": "MIT",
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "es-set-tostringtag": "^2.1.0",
- "hasown": "^2.0.2",
- "mime-types": "^2.1.12"
- },
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/axobject-query": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.1.1.tgz",
@@ -6315,6 +6304,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
@@ -6812,6 +6802,7 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
"dependencies": {
"delayed-stream": "~1.0.0"
},
@@ -7902,6 +7893,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "dev": true,
"engines": {
"node": ">=0.4.0"
}
@@ -8173,6 +8165,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
@@ -8402,6 +8395,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -8411,6 +8405,7 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -8446,6 +8441,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0"
@@ -8458,6 +8454,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
@@ -9747,6 +9744,7 @@
"version": "1.15.11",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
"integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
+ "dev": true,
"funding": [
{
"type": "individual",
@@ -9975,6 +9973,7 @@
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -10045,6 +10044,7 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
@@ -10084,6 +10084,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"dunder-proto": "^1.0.1",
@@ -10250,6 +10251,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -10358,6 +10360,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -10370,6 +10373,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"has-symbols": "^1.0.3"
@@ -10385,6 +10389,7 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "dev": true,
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
@@ -13780,6 +13785,10 @@
"shell-quote": "^1.7.3"
}
},
+ "node_modules/lethean_web3": {
+ "resolved": "../zano_web3",
+ "link": true
+ },
"node_modules/leven": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
@@ -14324,6 +14333,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -14422,6 +14432,7 @@
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true,
"engines": {
"node": ">= 0.6"
}
@@ -14430,6 +14441,7 @@
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
"dependencies": {
"mime-db": "1.52.0"
},
@@ -16881,12 +16893,6 @@
"node": ">= 0.10"
}
},
- "node_modules/proxy-from-env": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
- "license": "MIT"
- },
"node_modules/psl": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
@@ -21039,67 +21045,6 @@
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
- },
- "node_modules/zano_web3": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/zano_web3/-/zano_web3-9.2.2.tgz",
- "integrity": "sha512-WDTgMEZ8p5fpR/TJjq/J7c8bfo7Gn5mD0pQHmvR8PCsVpwzdgHNa0PGvuzw9j1WjA6IiMnCk5MMhK6JPHfvHgA==",
- "license": "ISC",
- "dependencies": {
- "@types/big.js": "^6.2.2",
- "@types/node": "^20.14.12",
- "@types/node-forge": "^1.3.11",
- "@types/react": "^18.3.3",
- "@types/uuid": "^10.0.0",
- "axios": "^1.7.2",
- "big.js": "^6.2.1",
- "decimal.js": "^10.4.3",
- "node-forge": "^1.3.1",
- "react": "^18.3.1",
- "typescript": "^5.5.4",
- "uuid": "^10.0.0"
- }
- },
- "node_modules/zano_web3/node_modules/@types/node": {
- "version": "20.19.33",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.33.tgz",
- "integrity": "sha512-Rs1bVAIdBs5gbTIKza/tgpMuG1k3U/UMJLWecIMxNdJFDMzcM5LOiLVRYh3PilWEYDIeUDv7bpiHPLPsbydGcw==",
- "license": "MIT",
- "dependencies": {
- "undici-types": "~6.21.0"
- }
- },
- "node_modules/zano_web3/node_modules/typescript": {
- "version": "5.9.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "node_modules/zano_web3/node_modules/undici-types": {
- "version": "6.21.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
- "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
- "license": "MIT"
- },
- "node_modules/zano_web3/node_modules/uuid": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
- "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
- "funding": [
- "https://github.com/sponsors/broofa",
- "https://github.com/sponsors/ctavan"
- ],
- "license": "MIT",
- "bin": {
- "uuid": "dist/bin/uuid"
- }
}
}
}
diff --git a/package.json b/package.json
index e452cdc..9e1b13d 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "zano-extension",
+ "name": "lethean-extension",
"version": "0.1.0",
"private": true,
"dependencies": {
@@ -20,7 +20,7 @@
"react-id-generator": "^3.0.2",
"sha256": "^0.2.0",
"web-vitals": "^2.1.4",
- "zano_web3": "^9.2.2"
+ "lethean_web3": "file:../zano_web3"
},
"scripts": {
"start": "react-scripts start",
diff --git a/public/images/lethean_128px.png b/public/images/lethean_128px.png
new file mode 100644
index 0000000..f840b1e
Binary files /dev/null and b/public/images/lethean_128px.png differ
diff --git a/public/images/lethean_16px.png b/public/images/lethean_16px.png
new file mode 100644
index 0000000..acf48d3
Binary files /dev/null and b/public/images/lethean_16px.png differ
diff --git a/public/images/lethean_48px.png b/public/images/lethean_48px.png
new file mode 100644
index 0000000..13f073e
Binary files /dev/null and b/public/images/lethean_48px.png differ
diff --git a/public/index.html b/public/index.html
index f5b8228..32d10fa 100644
--- a/public/index.html
+++ b/public/index.html
@@ -4,10 +4,10 @@
-
+
-
Zano extension
+ Lethean extension
diff --git a/public/manifest.json b/public/manifest.json
index 9b1c633..c20ec7b 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -1,18 +1,18 @@
{
"manifest_version": 3,
- "name": "Zano Companion",
+ "name": "Lethean Companion",
"version": "1.1.10",
- "description": "A browser extension for Zano wallet app",
+ "description": "A browser extension for Lethean wallet app",
"permissions": ["storage", "network"],
"content_security_policy": {
- "extension_pages": "script-src 'self'; object-src 'self'; connect-src 'self' http://localhost:* https://api.coingecko.com https://api.zano.org https://explorer.zano.org;"
+ "extension_pages": "script-src 'self'; object-src 'self'; connect-src 'self' http://localhost:* https://api.coingecko.com https://explorer.lthn.io https://trade.lthn.io;"
},
"action": {
"default_popup": "index.html",
"default_icon": {
- "16": "images/zano_16px.png",
- "48": "images/zano_48px.png",
- "128": "images/zano_128px.png"
+ "16": "images/lethean_16px.png",
+ "48": "images/lethean_48px.png",
+ "128": "images/lethean_128px.png"
}
},
"background": {
@@ -20,19 +20,19 @@
},
"content_scripts": [
{
- "matches": [""],
+ "matches": ["https://trade.lthn.io/*", "https://explorer.lthn.io/*", "https://*.lethean.io/*", "http://localhost:*/*"],
"js": ["static/js/content.bundle.js"]
},
{
"world": "MAIN",
"js": ["static/js/inject.bundle.js"],
- "matches": [""],
+ "matches": ["https://trade.lthn.io/*", "https://explorer.lthn.io/*", "https://*.lethean.io/*", "http://localhost:*/*"],
"run_at": "document_start"
}
],
"icons": {
- "16": "images/zano_16px.png",
- "48": "images/zano_48px.png",
- "128": "images/zano_128px.png"
+ "16": "images/lethean_16px.png",
+ "48": "images/lethean_48px.png",
+ "128": "images/lethean_128px.png"
}
}
diff --git a/src/app/App.tsx b/src/app/App.tsx
index 1d03ed1..cea552a 100644
--- a/src/app/App.tsx
+++ b/src/app/App.tsx
@@ -30,7 +30,7 @@ import {
setWhiteList,
} from './store/actions';
import { Store } from './store/store-reducer';
-import { getZanoPrice } from './api/coingecko';
+import { getLetheanPrice } from './api/coingecko';
import './styles/App.scss';
import PasswordPage from './components/PasswordPage/PasswordPage';
import MessageSignPage from './components/MessageSignPage/MessageSignPage';
@@ -188,7 +188,7 @@ function App() {
}, []);
useEffect(() => {
- getZanoPrice().then((priceData) => {
+ getLetheanPrice().then((priceData) => {
console.log('price data', priceData);
updatePriceData(dispatch as dispatchType, priceData);
});
diff --git a/src/app/api/coingecko.ts b/src/app/api/coingecko.ts
index 4416007..49a06b9 100644
--- a/src/app/api/coingecko.ts
+++ b/src/app/api/coingecko.ts
@@ -1,5 +1,5 @@
-export const getZanoPrice = async () => {
- const coinId = 'zano';
+export const getLetheanPrice = async () => {
+ const coinId = 'lethean';
const vsCurrency = 'usd';
// Fetch current price
@@ -16,7 +16,7 @@ export const getZanoPrice = async () => {
const coinData = await coinResponse.json();
const priceChange24h = coinData.market_data.price_change_percentage_24h;
- console.log(`Current price of Zano: $${currentPrice}`);
+ console.log(`Current price of Lethean: $${currentPrice}`);
console.log(`24-hour price change: ${priceChange24h.toFixed(2)}%`);
return { price: currentPrice, change: priceChange24h.toFixed(2) };
diff --git a/src/app/assets/tokens-svg/zano.svg b/src/app/assets/tokens-svg/lethean.svg
similarity index 100%
rename from src/app/assets/tokens-svg/zano.svg
rename to src/app/assets/tokens-svg/lethean.svg
diff --git a/src/app/components/AliasCreatePage/AliasCreatePaget.tsx b/src/app/components/AliasCreatePage/AliasCreatePaget.tsx
index 227c10d..41c36b4 100644
--- a/src/app/components/AliasCreatePage/AliasCreatePaget.tsx
+++ b/src/app/components/AliasCreatePage/AliasCreatePaget.tsx
@@ -71,7 +71,7 @@ export default function AliasCreatePage() {
- {fee} ZANO
+ {fee} LTHN
diff --git a/src/app/components/AliasManagePage/index.tsx b/src/app/components/AliasManagePage/index.tsx
index 21317aa..08968ce 100644
--- a/src/app/components/AliasManagePage/index.tsx
+++ b/src/app/components/AliasManagePage/index.tsx
@@ -96,7 +96,7 @@ const AliasManagePage = ({ mode = 'create' }) => {
- {fee} ZANO
+ {fee} LTHN
diff --git a/src/app/components/AliasTransfer/index.tsx b/src/app/components/AliasTransfer/index.tsx
index 7ece83f..510b4fe 100644
--- a/src/app/components/AliasTransfer/index.tsx
+++ b/src/app/components/AliasTransfer/index.tsx
@@ -89,7 +89,7 @@ const AliasTransfer = () => {
- {fee} ZANO
+ {fee} LTHN
diff --git a/src/app/components/AppPlug/AppPlug.tsx b/src/app/components/AppPlug/AppPlug.tsx
index 0a7d4bc..a6e3472 100644
--- a/src/app/components/AppPlug/AppPlug.tsx
+++ b/src/app/components/AppPlug/AppPlug.tsx
@@ -19,7 +19,7 @@ const AppPlug: React.FC = (props) => {
const btnClasses = state.isLoading ? [s.plugButton, s.hidden].join(' ') : s.plugButton;
const openDocs = () => {
- window.open('https://docs.zano.org/docs/use/companion', '_blank');
+ window.open('https://docs.lethean.io/docs/use/companion', '_blank');
};
return (
@@ -28,7 +28,7 @@ const AppPlug: React.FC = (props) => {
-

+
diff --git a/src/app/components/ConnectPage/ConnectPage.tsx b/src/app/components/ConnectPage/ConnectPage.tsx
index ed2b105..ba788bd 100644
--- a/src/app/components/ConnectPage/ConnectPage.tsx
+++ b/src/app/components/ConnectPage/ConnectPage.tsx
@@ -100,7 +100,7 @@ export default function ConnectPage({
return (
-

+
{
)}
- {censorValue(Number(wallet.balance).toFixed(2))} ZANO
+ {censorValue(Number(wallet.balance).toFixed(2))} LTHN
))}
diff --git a/src/app/components/OuterConfirmation/OuterConfirmation.tsx b/src/app/components/OuterConfirmation/OuterConfirmation.tsx
index 2e1f844..4a2ec81 100644
--- a/src/app/components/OuterConfirmation/OuterConfirmation.tsx
+++ b/src/app/components/OuterConfirmation/OuterConfirmation.tsx
@@ -7,7 +7,7 @@ import { fetchBackground, shortenAddress } from '../../utils/utils';
import arrowIcon from '../../assets/svg/arrow-blue.svg';
import InfoTooltip from '../UI/InfoTooltip';
import { BurnAssetDataType } from '../../../types';
-import { ZANO_ASSET_ID } from '../../../constants';
+import { LTHN_ASSET_ID } from '../../../constants';
import { Store } from '../../store/store-reducer';
import WhitelistIconImage from '../UI/WhitelistIconImage';
@@ -93,7 +93,7 @@ const OuterConfirmation = () => {
const fee = 0.01;
const balance = new Decimal(state.wallet?.balance || 0);
const locked = new Decimal(state.wallet?.lockedBalance || 0);
- const zanoBalance = balance.minus(locked);
+ const letheanBalance = balance.minus(locked);
const rawTotalAmount = isMultipleDestinations
? destinations.reduce(
(sum: Decimal, dest: { amount: string }) => sum.plus(new Decimal(dest.amount || 0)),
@@ -102,35 +102,35 @@ const OuterConfirmation = () => {
: new Decimal(transactionParams.Amount || 0);
const assetBalance =
- assetId === ZANO_ASSET_ID
- ? zanoBalance
+ assetId === LTHN_ASSET_ID
+ ? letheanBalance
: new Decimal(state.wallet?.assets?.find((a) => a.assetId === assetId)?.balance || 0);
const feeBig = new Decimal(fee);
const swapAmount = new Decimal(sendingAmount || 0);
const notEnoughFee = useMemo(() => {
- return zanoBalance.lessThan(feeBig);
- }, [zanoBalance, feeBig]);
+ return letheanBalance.lessThan(feeBig);
+ }, [letheanBalance, feeBig]);
const notEnoughAmount = useMemo(() => {
if (!isTransferMethod) return false;
- if (assetId === ZANO_ASSET_ID) {
- return zanoBalance.lessThan(rawTotalAmount.plus(feeBig));
+ if (assetId === LTHN_ASSET_ID) {
+ return letheanBalance.lessThan(rawTotalAmount.plus(feeBig));
}
return assetBalance.lessThan(rawTotalAmount);
- }, [isTransferMethod, assetId, zanoBalance, assetBalance, rawTotalAmount, feeBig]);
+ }, [isTransferMethod, assetId, letheanBalance, assetBalance, rawTotalAmount, feeBig]);
const notEnoughSwapAmount = useMemo(() => {
if (!isIonicSwapMethod) return false;
- if (assetId === ZANO_ASSET_ID) {
- return zanoBalance.lessThan(swapAmount.plus(feeBig));
+ if (assetId === LTHN_ASSET_ID) {
+ return letheanBalance.lessThan(swapAmount.plus(feeBig));
}
return assetBalance.lessThan(swapAmount);
- }, [isIonicSwapMethod, assetId, assetBalance, swapAmount, zanoBalance, feeBig]);
+ }, [isIonicSwapMethod, assetId, assetBalance, swapAmount, letheanBalance, feeBig]);
const disabled = accepting || denying;
const insufficientBalance =
@@ -379,7 +379,7 @@ const OuterConfirmation = () => {
Transaction fee
- {fee} ZANO
+ {fee} LTHN
diff --git a/src/app/components/PasswordPage/PasswordPage.tsx b/src/app/components/PasswordPage/PasswordPage.tsx
index 9a51009..0cb440c 100644
--- a/src/app/components/PasswordPage/PasswordPage.tsx
+++ b/src/app/components/PasswordPage/PasswordPage.tsx
@@ -26,7 +26,7 @@ function PasswordPage(props: PasswordPageProps) {
return (
-

+
Enter your password
(null);
useEffect(() => {
- if (assetId === ZANO_ASSET_ID) {
+ if (assetId === LTHN_ASSET_ID) {
setAssetPrice(state.priceData.price);
return;
}
- fetch(`https://explorer.zano.org/api/price?asset_id=${assetId}`)
+ fetch(`https://explorer.lethean.io/api/price?asset_id=${assetId}`)
.then((response) => response.json())
.then((response) => {
if (response.data && response.data.usd) {
diff --git a/src/app/components/TokensTabs/History/History.tsx b/src/app/components/TokensTabs/History/History.tsx
index c5d2439..49cdfcf 100644
--- a/src/app/components/TokensTabs/History/History.tsx
+++ b/src/app/components/TokensTabs/History/History.tsx
@@ -8,7 +8,7 @@ import TransactionDetails from '../../TransactionDetails/TransactionDetails';
import s from './History.module.scss';
import NavLink from '../../UI/NavLink/NavLink';
import useGetAsset from '../../../hooks/useGetAsset';
-import { ZANO_ASSET_ID } from '../../../../constants';
+import { LTHN_ASSET_ID } from '../../../../constants';
interface HistoryItemProps {
transfer: {
@@ -37,7 +37,7 @@ const HistoryItem = ({ transfer, fee, isInitiator }: HistoryItemProps) => {
if (amount === undefined) {
displayAmount = 'N/A';
- } else if (transfer.assetId === ZANO_ASSET_ID) {
+ } else if (transfer.assetId === LTHN_ASSET_ID) {
if (!isInitiator || transfer.incoming) {
displayAmount = amount.toFixed();
} else {
diff --git a/src/app/components/TransactionDetails/TransactionDetails.tsx b/src/app/components/TransactionDetails/TransactionDetails.tsx
index 1767642..956667c 100644
--- a/src/app/components/TransactionDetails/TransactionDetails.tsx
+++ b/src/app/components/TransactionDetails/TransactionDetails.tsx
@@ -7,7 +7,7 @@ import { useCopy } from '../../hooks/useCopy';
import RoutersNav from '../UI/RoutersNav/RoutersNav';
import { Store } from '../../store/store-reducer';
import styles from './TransactionDetails.module.scss';
-import { ZANO_ASSET_ID } from '../../../constants';
+import { LTHN_ASSET_ID } from '../../../constants';
type Transfer = {
amount: string;
@@ -84,11 +84,11 @@ const TransactionDetails: React.FC = (props) => {
{(() => {
- const isZano = transfer.assetId === ZANO_ASSET_ID;
+ const isLethean = transfer.assetId === LTHN_ASSET_ID;
let amountText: string;
- if (isZano) {
+ if (isLethean) {
if (!props.isInitiator) {
amountText = amount.toFixed();
} else {
@@ -124,7 +124,7 @@ const TransactionDetails: React.FC = (props) => {
})}
-
+
{props.addresses && (
)}
diff --git a/src/app/components/UI/WhitelistIconImage/index.tsx b/src/app/components/UI/WhitelistIconImage/index.tsx
index 9e5d1e0..55fa932 100644
--- a/src/app/components/UI/WhitelistIconImage/index.tsx
+++ b/src/app/components/UI/WhitelistIconImage/index.tsx
@@ -1,8 +1,8 @@
import DOMPurify from 'dompurify';
import React, { useEffect, useMemo, useState } from 'react';
-import { BANDIT_ASSET_ID, ZANO_ASSET_ID } from '../../../../constants';
+import { BANDIT_ASSET_ID, LTHN_ASSET_ID } from '../../../../constants';
import customTokenIcon from '../../../assets/tokens-svg/custom-token.svg';
-import zanoIcon from '../../../assets/tokens-svg/zano.svg';
+import letheanIcon from '../../../assets/tokens-svg/lethean.svg';
import banditIcon from '../../../assets/tokens-svg/bandit-icon.svg';
import { WhitelistIconImageProps } from './types';
@@ -12,7 +12,7 @@ function WhitelistIconImage({ asset, width, height, className }: WhitelistIconIm
} | null>(null);
useEffect(() => {
- fetch('https://api.zano.org/assets_whitelist.json')
+ fetch('https://api.lethean.io/assets_whitelist.json')
.then((response) => response.json())
.then(setWhitelistData)
.catch((error) => console.error('Error fetching asset whitelist:', error));
@@ -45,8 +45,8 @@ function WhitelistIconImage({ asset, width, height, className }: WhitelistIconIm
);
}
- if (ZANO_ASSET_ID === asset.assetId) {
- return
;
+ if (LTHN_ASSET_ID === asset.assetId) {
+ return
;
}
if (BANDIT_ASSET_ID === asset.assetId) {
diff --git a/src/app/components/Wallet/Wallet.tsx b/src/app/components/Wallet/Wallet.tsx
index 5d7f04d..cf4220e 100644
--- a/src/app/components/Wallet/Wallet.tsx
+++ b/src/app/components/Wallet/Wallet.tsx
@@ -21,7 +21,7 @@ import WalletSend from '../WalletSend/WalletSend';
import s from './Wallet.module.scss';
import NavLink from '../UI/NavLink/NavLink';
import { classNames } from '../../utils/classNames';
-import { ZANO_ASSET_ID } from '../../../constants';
+import { LTHN_ASSET_ID } from '../../../constants';
import AliasManagePage from '../AliasManagePage';
import AliasTransfer from '../AliasTransfer';
@@ -56,13 +56,13 @@ const Wallet = ({ setConnectOpened }: { setConnectOpened: Dispatch
);
};
const getUnlockedBalance = () =>
- state.wallet.assets.find((asset) => asset.assetId === ZANO_ASSET_ID)?.unlockedBalance;
+ state.wallet.assets.find((asset) => asset.assetId === LTHN_ASSET_ID)?.unlockedBalance;
const flipDisplay = () => {
updateDisplay(dispatch as DispatchFunction, !state.displayUsd as never);
@@ -145,7 +145,7 @@ const Wallet = ({ setConnectOpened }: { setConnectOpened: Dispatch
- {lockedBalanceDisplay} ZANO
+ {lockedBalanceDisplay} LTHN
)}
diff --git a/src/app/components/WalletSend/WalletSend.tsx b/src/app/components/WalletSend/WalletSend.tsx
index 306936d..ed977f8 100644
--- a/src/app/components/WalletSend/WalletSend.tsx
+++ b/src/app/components/WalletSend/WalletSend.tsx
@@ -5,7 +5,7 @@ import {
validateTokensInput,
// @ts-expect-error - Disabling TS error while importing /shared submodule
// due to global tsconfig "moduleResolution" prop is set to "node"
-} from 'zano_web3/shared';
+} from 'lethean_web3/shared';
import failedImage from '../../assets/images/failed-round.png';
import successImage from '../../assets/images/success-round.png';
@@ -114,7 +114,7 @@ const WalletSend = () => {
const openExplorer = (txId: string) => {
// eslint-disable-next-line no-undef
chrome.tabs.create({
- url: `https://testnet-explorer.zano.org/block/${txId}`,
+ url: `https://testnet-explorer.lethean.io/block/${txId}`,
});
};
@@ -157,12 +157,12 @@ const WalletSend = () => {
let isValid = false;
try {
- const isValidZanoAssetAmount = validateTokensInput(
+ const isValidLetheanAssetAmount = validateTokensInput(
amount.value,
Number(asset.decimalPoint),
).valid;
- isValid = isValidZanoAssetAmount && isAmountAvailable;
+ isValid = isValidLetheanAssetAmount && isAmountAvailable;
} catch {
isValid = false;
}
diff --git a/src/app/components/WalletSend/ui/AssetsSelect/AssetsSelect.tsx b/src/app/components/WalletSend/ui/AssetsSelect/AssetsSelect.tsx
index 0db09ee..770b188 100644
--- a/src/app/components/WalletSend/ui/AssetsSelect/AssetsSelect.tsx
+++ b/src/app/components/WalletSend/ui/AssetsSelect/AssetsSelect.tsx
@@ -2,7 +2,7 @@ import React, { Dispatch, SetStateAction, useContext, useEffect, useRef, useStat
import bitcoinIcon from '../../../../assets/tokens-svg/bitcoin.svg';
import customTokenIcon from '../../../../assets/tokens-svg/custom-token.svg';
import ethIcon from '../../../../assets/tokens-svg/eth.svg';
-import zanoIcon from '../../../../assets/tokens-svg/zano.svg';
+import letheanIcon from '../../../../assets/tokens-svg/lethean.svg';
import arrowIcon from '../../../../assets/svg/arrow-select.svg';
import { Store } from '../../../../store/store-reducer';
import mainStyles from '../../WalletSend.module.scss';
diff --git a/src/app/config/config.ts b/src/app/config/config.ts
index 8adf05f..3dde412 100644
--- a/src/app/config/config.ts
+++ b/src/app/config/config.ts
@@ -1,10 +1,10 @@
-import { ZANO_ASSET_ID } from '../../constants';
+import { LTHN_ASSET_ID } from '../../constants';
export const whitelistedAssets = [
{
- asset_id: ZANO_ASSET_ID,
- ticker: 'ZANO',
- full_name: 'Zano',
+ asset_id: LTHN_ASSET_ID,
+ ticker: 'LTHN',
+ full_name: 'Lethean',
},
{
asset_id: 'e03a140b8447d2895290022b25c06bdabea514e2475ae56ce5bcbc554ab9865c',
@@ -13,4 +13,4 @@ export const whitelistedAssets = [
},
];
-export const defaultPort = 11211;
+export const defaultPort = 46941;
diff --git a/src/app/store/store-reducer.tsx b/src/app/store/store-reducer.tsx
index d763553..858e49e 100644
--- a/src/app/store/store-reducer.tsx
+++ b/src/app/store/store-reducer.tsx
@@ -103,7 +103,7 @@ const initialState: State = {
isConfirmed: true,
incoming: true,
amount: 100,
- ticker: 'ZANO',
+ ticker: 'LTHN',
address:
'ZxDTZ8LJ88ZK6Ja1P9iqDNgCiBM6FhiBKdDoTAoEp9nY9q8d846iePAGYGjNvrU9uFHDXD3by5CooSBrsXBDfE9M11WBwAxQ9',
},
@@ -111,7 +111,7 @@ const initialState: State = {
isConfirmed: false,
incoming: false,
value: 17,
- ticker: 'ZANO',
+ ticker: 'LTHN',
address:
'ZxDTZ8LJ88ZK6Ja1P9iqDNgCiBM6FhiBKdDoTAoEp9nY9q8d846iePAGYGjNvrU9uFHDXD3by5CooSBrsXBDfE9M11WBwAxQ9',
},
diff --git a/src/background/background.ts b/src/background/background.ts
index 9694b43..e81018d 100644
--- a/src/background/background.ts
+++ b/src/background/background.ts
@@ -1,5 +1,5 @@
import JSONbig from 'json-bigint';
-import { ZANO_ASSET_ID } from '../constants';
+import { LTHN_ASSET_ID } from '../constants';
import { BurnAssetDataType, ionicSwapType, RequestType, TransferDataType } from '../types/index';
import {
fetchData,
@@ -26,7 +26,7 @@ import { truncateToDecimals } from '../app/utils/utils';
const POPUP_HEIGHT = 630;
const POPUP_WIDTH = 370;
-const ZANO_ID = ZANO_ASSET_ID;
+const LTHN_ID = LTHN_ASSET_ID;
interface PopupRequest {
windowId?: number;
@@ -176,7 +176,7 @@ interface Credentials {
}
const defaultCredentials: Credentials = {
- port: 11211,
+ port: 46941,
};
export let apiCredentials: Credentials = { ...defaultCredentials };
@@ -465,7 +465,7 @@ async function processRequest(request: RequestType, sender: Sender, sendResponse
const { address } = walletData;
console.log('asset to transfer:', asset);
- request.asset = asset || (await getAsset(ZANO_ID));
+ request.asset = asset || (await getAsset(LTHN_ID));
request.sender = address || '';
const decimal_point = request.asset?.decimal_point ?? 12;
diff --git a/src/background/wallet.ts b/src/background/wallet.ts
index e1f885f..0eaf54e 100644
--- a/src/background/wallet.ts
+++ b/src/background/wallet.ts
@@ -3,7 +3,7 @@ import { Buffer } from 'buffer';
import JSONbig from 'json-bigint';
import { apiCredentials } from './background';
import { addZeros, removeZeros } from '../app/utils/utils';
-import { ZANO_ASSET_ID } from '../constants';
+import { LTHN_ASSET_ID } from '../constants';
import {
BurnAssetDataType,
ionicSwapType,
@@ -58,7 +58,7 @@ function generateAccessToken(httpBody: string) {
// Example payload
const payload = {
body_hash: bodyHash,
- user: 'zano_extension',
+ user: 'lethean_extension',
salt: generateRandomString(64),
exp: Math.floor(Date.now() / 1000) + 60, // Expires in 1 minute
};
@@ -90,7 +90,7 @@ export const fetchData = async (
method: 'POST',
headers: {
'Content-Type': 'application/json',
- 'Zano-Access-Token': generateAccessToken(httpBody),
+ 'Lethean-Access-Token': generateAccessToken(httpBody),
},
body: httpBody,
});
@@ -145,7 +145,7 @@ export const getWallets = async () => {
data.result.wallets.map(async (wallet: WalletRaw) => {
const alias = await getAlias(wallet.wi.address);
const balanceRaw =
- wallet?.wi?.balances?.find((asset) => asset.asset_info.asset_id === ZANO_ASSET_ID)
+ wallet?.wi?.balances?.find((asset) => asset.asset_info.asset_id === LTHN_ASSET_ID)
?.total || '0';
return {
@@ -184,8 +184,8 @@ export const getWalletData = async () => {
unlockedBalance: removeZeros(asset.unlocked, asset.asset_info.decimal_point),
}))
.sort((a, b) => {
- if (a.assetId === ZANO_ASSET_ID) return -1;
- if (b.assetId === ZANO_ASSET_ID) return 1;
+ if (a.assetId === LTHN_ASSET_ID) return -1;
+ if (b.assetId === LTHN_ASSET_ID) return 1;
return 0;
});
@@ -194,7 +194,7 @@ export const getWalletData = async () => {
}
const balance = removeZeros(
- balanceParsed.result.balances.find((asset) => asset.asset_info.asset_id === ZANO_ASSET_ID)
+ balanceParsed.result.balances.find((asset) => asset.asset_info.asset_id === LTHN_ASSET_ID)
?.total || '0',
);
@@ -340,7 +340,7 @@ export const getAliasByAddress = async (address: string) => {
};
export const transfer = async (
- assetId = ZANO_ASSET_ID,
+ assetId = LTHN_ASSET_ID,
destination: string | undefined,
amount: string | undefined,
decimalPoint: number,
@@ -395,7 +395,7 @@ export const burnBridge = async (
amount: string,
destinationAddress: string,
destinationChainId: string,
- assetId = ZANO_ASSET_ID,
+ assetId = LTHN_ASSET_ID,
) => {
const bodyData = {
service_id: 'B',
@@ -487,15 +487,15 @@ export const getSwapProposalInfo = async (hex: string | undefined) => {
};
export async function getWhiteList() {
- const fetchedWhiteList = await fetch('https://api.zano.org/assets_whitelist.json')
+ const fetchedWhiteList = await fetch('https://api.lethean.io/assets_whitelist.json')
.then((response) => response.json())
.then((data) => data.assets);
- if (fetchedWhiteList.every((e: { asset_id: string }) => e.asset_id !== ZANO_ASSET_ID)) {
+ if (fetchedWhiteList.every((e: { asset_id: string }) => e.asset_id !== LTHN_ASSET_ID)) {
fetchedWhiteList.push({
- asset_id: ZANO_ASSET_ID,
- ticker: 'ZANO',
- full_name: 'Zano',
+ asset_id: LTHN_ASSET_ID,
+ ticker: 'LTHN',
+ full_name: 'Lethean',
decimal_point: 12,
});
}
@@ -516,11 +516,11 @@ export async function getAssetInfo(assetId: string) {
}
export async function getAsset(assetId: string): Promise
{
- if (assetId === ZANO_ASSET_ID) {
+ if (assetId === LTHN_ASSET_ID) {
return {
- asset_id: ZANO_ASSET_ID,
- ticker: 'ZANO',
- full_name: 'Zano',
+ asset_id: LTHN_ASSET_ID,
+ ticker: 'LTHN',
+ full_name: 'Lethean',
decimal_point: 12,
};
}
diff --git a/src/constants/index.ts b/src/constants/index.ts
index 12de7fc..ccb7d2c 100644
--- a/src/constants/index.ts
+++ b/src/constants/index.ts
@@ -1,4 +1,6 @@
-export const ZANO_ASSET_ID = 'd6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a';
+export const LTHN_ASSET_ID = 'd6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a';
+/** @deprecated Use LTHN_ASSET_ID */
+export const LETHEAN_ASSET_ID = LTHN_ASSET_ID;
export const BANDIT_ASSET_ID = '55a8e0a730b133fb83915ba0e4335a680ae9d07a99642b17774460560f3b003d';
export const WETH_ASSET_ID = '93da681503353509367e241cda3234299dedbbad9ec851de31e900490807bf0c';
export const WBTC_ASSET_ID = '040a180aca4194a158c17945dd115db42086f6f074c1f77838621a4927fffa91';
diff --git a/src/content/content.ts b/src/content/content.ts
index 6ef10f9..2dcc54f 100644
--- a/src/content/content.ts
+++ b/src/content/content.ts
@@ -1,22 +1,22 @@
-interface ZanoRequestData {
+interface LetheanRequestData {
method: string;
listenerID: string;
timeout?: number | null;
[key: string]: string | number | boolean | null | undefined;
}
interface DocumentEventMap {
- zano_request: CustomEvent;
+ lethean_request: CustomEvent;
}
-interface ZanoResponse {
+interface LetheanResponse {
error?: string;
[key: string]: string | number | boolean | null | undefined;
}
-async function fetchData(data: ZanoRequestData): Promise {
+async function fetchData(data: LetheanRequestData): Promise {
return new Promise((resolve, reject) => {
try {
- chrome.runtime.sendMessage(data, (response: ZanoResponse) => {
+ chrome.runtime.sendMessage(data, (response: LetheanResponse) => {
if (chrome.runtime.lastError) {
reject(chrome.runtime.lastError);
} else {
@@ -29,20 +29,20 @@ async function fetchData(data: ZanoRequestData): Promise {
});
}
-document.addEventListener('zano_request', async (e: CustomEvent) => {
+document.addEventListener('lethean_request', async (e: CustomEvent) => {
const data = e.detail;
try {
const response = await fetchData(data);
document.dispatchEvent(
- new CustomEvent(`zano_response_${data.listenerID}`, {
+ new CustomEvent(`lethean_response_${data.listenerID}`, {
detail: response,
}),
);
} catch (error) {
document.dispatchEvent(
- new CustomEvent(`zano_response_${data.listenerID}`, {
+ new CustomEvent(`lethean_response_${data.listenerID}`, {
detail: { error: error instanceof Error ? error.message : String(error) },
}),
);
diff --git a/src/content/inject.ts b/src/content/inject.ts
index 9053c84..4c9c40e 100644
--- a/src/content/inject.ts
+++ b/src/content/inject.ts
@@ -1,4 +1,4 @@
-class Zano {
+class Lethean {
async request(
method: string,
params: Record,
@@ -25,20 +25,20 @@ class Zano {
? setTimeout(() => {
reject(new Error('Request timeout exceeded'));
document.removeEventListener(
- `zano_response_${listenerID}`,
+ `lethean_response_${listenerID}`,
handleResponse as EventListener,
);
}, timeoutMs)
: undefined;
document.addEventListener(
- `zano_response_${listenerID}`,
+ `lethean_response_${listenerID}`,
handleResponse as EventListener,
);
function handleResponse(e: CustomEvent) {
document.removeEventListener(
- `zano_response_${listenerID}`,
+ `lethean_response_${listenerID}`,
handleResponse as EventListener,
);
if (timeout) {
@@ -48,7 +48,7 @@ class Zano {
}
document.dispatchEvent(
- new CustomEvent('zano_request', {
+ new CustomEvent('lethean_request', {
detail: {
method,
listenerID,
@@ -61,4 +61,4 @@ class Zano {
}
}
-window.zano = new Zano();
+window.lethean = new Lethean();
diff --git a/src/global.d.ts b/src/global.d.ts
index d591d42..10d3bdc 100644
--- a/src/global.d.ts
+++ b/src/global.d.ts
@@ -1,5 +1,5 @@
interface Window {
- zano: Zano;
+ lethean: Lethean;
}
declare module '*.scss' {
const content: { [className: string]: string };
diff --git a/webpack.common.js b/webpack.common.js
index 0d1d5d7..898de7b 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -4,7 +4,7 @@ module.exports = {
module: {
rules: [
{
- include: /node_modules[\\/]zano_web3[\\/]/,
+ include: /node_modules[\\/]lethean_web3[\\/]/,
resolve: {
fullySpecified: false,
},