Skip to content
This repository has been archived by the owner on Mar 11, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:Wallet3/Wallet3
Browse files Browse the repository at this point in the history
  • Loading branch information
baryon committed Dec 23, 2021
2 parents 48c320b + ad31bd4 commit 896c9e4
Show file tree
Hide file tree
Showing 20 changed files with 184 additions and 78 deletions.
1 change: 1 addition & 0 deletions electron-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module.exports = {
target: 'AppImage',
icon: 'assets/AppIcon.png',
publish: ['github'],
mimeTypes: ['x-scheme-handler/wallet3']
},
nsis: {
deleteAppDataOnUninstall: true,
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wallet3",
"productName": "Wallet 3",
"version": "1.9.0",
"version": "1.9.1",
"description": "A Secure Wallet for Web3",
"main": ".webpack/main",
"repository": {
Expand Down Expand Up @@ -64,8 +64,8 @@
"@types/react-router-dom": "^5.3.2",
"@types/react-select": "^5.0.1",
"@types/react-virtualized": "^9.21.15",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"@vercel/webpack-asset-relocator-loader": "^1.7.0",
"babel-jest": "^27.4.2",
"css-loader": "^6.5.1",
Expand All @@ -74,7 +74,7 @@
"electron-notarize": "^1.1.1",
"electron-osx-sign": "^0.5.0",
"electron-squirrel-startup": "^1.0.0",
"eslint": "^8.4.1",
"eslint": "^8.5.0",
"eslint-plugin-import": "^2.25.3",
"fork-ts-checker-webpack-plugin": "^6.5.0",
"jest": "^27.4.3",
Expand Down Expand Up @@ -103,11 +103,11 @@
"feather-icons": "^4.28.0",
"feather-icons-react": "^0.5.0",
"got": "^11.8.3",
"i18next": "^21.6.0",
"i18next": "^21.6.3",
"is-online": "^9.0.1",
"jsqr": "^1.4.0",
"keytar": "^7.7.0",
"mobx": "^6.3.8",
"mobx": "^6.3.10",
"mobx-react-lite": "^3.2.2",
"mousetrap": "^1.6.5",
"numeral": "^2.0.6",
Expand Down
Binary file added src/assets/icons/app/AppIcon_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/app/tray_linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions src/assets/icons/networks/boba.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/backend/App.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Biometrics from './lib/Biometrics';
import * as Cipher from '../common/Cipher';

import { BrowserWindow, TouchBar, TouchBarButton, app, ipcMain } from 'electron';
import { BrowserWindow, TouchBar, TouchBarButton, app, ipcMain, nativeImage } from 'electron';
import { DBMan, KeyMan, TxMan } from './mans';
import MessageKeys, {
AuthenticationResult,
Expand Down Expand Up @@ -454,6 +454,9 @@ export class App {
popup.loadURL(POPUP_WINDOW_WEBPACK_ENTRY);
popup.once('ready-to-show', () => popup.show());

if (process.platform === 'linux')
popup.setIcon(nativeImage.createFromDataURL(require('../assets/icons/app/AppIcon_256.png').default));

return new Promise<BrowserWindow>((resolve) => {
popup.webContents.once('did-finish-load', () => {
popup.webContents.send(MessageKeys.initWindowType, { type, payload });
Expand Down
10 changes: 10 additions & 0 deletions src/common/Networks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
ArbiPopularTokens,
BobaPopularTokens,
BscPopularTokens,
CeloPopularTokens,
EthereumPopularTokens,
Expand Down Expand Up @@ -60,6 +61,15 @@ export const PublicNetworks: INetwork[] = [
defaultTokens: ArbiPopularTokens,
showOverview: false,
},
// {
// symbol: 'ETH',
// comm_id: 'boba',
// network: 'Boba',
// chainId: 288,
// color: '#1CD8D2',
// l2: true,
// defaultTokens: BobaPopularTokens,
// },
{
symbol: 'MATIC',
comm_id: 'matic',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"Fee": "Fee",
"Unsupported Network": "Unsupported Network",
"Current network is not supported yet": "Current network is not supported yet",
"Mobile_sync_1": "1. Download Wallet 3 for mobile",
"Mobile_sync_1": "1. Download Wallet 3 mobile",
"Mobile_sync_2": "2. Tap 'Import a wallet'",
"Mobile_sync_3": "3. Sync with Wallet 3 Desktop"
}
5 changes: 4 additions & 1 deletion src/i18n/translations/jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,8 @@
"Slippage": "スリッページ",
"Fee": "手数料",
"Unsupported Network": "非対応のネットワーク",
"Current network is not supported yet": "今のネットワークはまだサポートされていません"
"Current network is not supported yet": "今のネットワークはまだサポートされていません",
"Mobile_sync_1": "1. Wallet 3 モバイルをダウンロード",
"Mobile_sync_2": "2. 「ウォレットのインポート」をタップ",
"Mobile_sync_3": "3. 「Wallet 3 Desktopとの同期」をクリック"
}
5 changes: 4 additions & 1 deletion src/i18n/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,8 @@
"Slippage": "滑点",
"Fee": "手续费",
"Unsupported Network": "暂未支持该网络",
"Current network is not supported yet": "该网络暂未支持,请关注最新版本的 Wallet 3"
"Current network is not supported yet": "该网络暂未支持,请关注最新版本的 Wallet 3",
"Mobile_sync_1": "1. 下载 Wallet 3 手机版",
"Mobile_sync_2": "2. 点击导入钱包",
"Mobile_sync_3": "3. 点击与桌面端同步"
}
5 changes: 4 additions & 1 deletion src/i18n/translations/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,8 @@
"Slippage": "滑點",
"Fee": "手續費",
"Unsupported Network": "暫未支持該網絡",
"Current network is not supported yet": "該網絡暫未支持,請關註最新版本的 Wallet 3"
"Current network is not supported yet": "該網絡暫未支持,請關註最新版本的 Wallet 3",
"Mobile_sync_1": "1. 下載 Wallet 3 手機版",
"Mobile_sync_2": "2. 點擊導入錢包",
"Mobile_sync_3": "3. 點擊與桌面端同步"
}
16 changes: 8 additions & 8 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ button.menu-button:hover {
background-color: var(--border-color);
}

#root.win32 ::-webkit-scrollbar {
#root.win32 ::-webkit-scrollbar, #root.linux ::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: rgba(0, 0, 0, 0);
Expand All @@ -205,15 +205,15 @@ button.menu-button:hover {
-webkit-app-region: no-drag;
}

#root.win32 ::-webkit-scrollbar:start {
#root.win32 ::-webkit-scrollbar:start, #root.linux ::-webkit-scrollbar:start {
opacity: 1;
}

#root.win32 ::-webkit-scrollbar:hover {
#root.win32 ::-webkit-scrollbar:hover, #root.linux ::-webkit-scrollbar:hover {
background-color: rgba(0, 0, 0, 0.09);
}

#root.win32 ::-webkit-scrollbar-thumb {
#root.win32 ::-webkit-scrollbar-thumb, #root.linux ::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.25);
border-radius: 100px;
-webkit-app-region: no-drag;
Expand All @@ -222,20 +222,20 @@ button.menu-button:hover {
transition: all 0.3s;
}

#root.win32 ::-webkit-scrollbar-thumb:active {
#root.win32 ::-webkit-scrollbar-thumb:active, #root.linux ::-webkit-scrollbar-thumb:active {
background: rgba(0, 0, 0, 0.5);
border-radius: 100px;
}

#root.win32 ::-webkit-scrollbar-thumb:vertical {
#root.win32 ::-webkit-scrollbar-thumb:vertical, #root.linux ::-webkit-scrollbar-thumb:vertical {
min-height: 10px;
}

#root.win32 ::-webkit-scrollbar-thumb:horizontal {
#root.win32 ::-webkit-scrollbar-thumb:horizontal, #root.linux ::-webkit-scrollbar-thumb:horizontal {
min-width: 10px;
height: 8px;
}

#root.win32 ::-webkit-scrollbar-button {
#root.win32 ::-webkit-scrollbar-button, #root.linux ::-webkit-scrollbar-button {
display: none;
}
12 changes: 8 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ let idleTimer: NodeJS.Timeout;
const prod = app.isPackaged;
const isMac = process.platform === 'darwin';
const isWin = process.platform === 'win32';
const isLinux = process.platform === 'linux';

process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
if (!isMac) require('@electron/remote/main').initialize();
Expand Down Expand Up @@ -114,7 +115,7 @@ const createTray = async () => {
};

const createWindow = async (): Promise<void> => {
if (App.mainWindow) {
if (App.mainWindow && !App.mainWindow.isDestroyed()) {
App.mainWindow.show();
App.mainWindow.focus();
return;
Expand Down Expand Up @@ -142,15 +143,18 @@ const createWindow = async (): Promise<void> => {
App.mainWindow = mainWindow;
mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY, {});

if (isLinux) mainWindow.setIcon(nativeImage.createFromDataURL(require('./assets/icons/app/AppIcon_256.png').default));

mainWindow.once('closed', () => {
mainWindow.removeAllListeners();
if (isMac) app.dock.hide();
if (!isWin) app.dock?.hide();
App.mainWindow = undefined;
});

createTouchBar(mainWindow);
createTray();
if (isMac) app.dock.show();

if (!isWin) app.dock?.show();
};

// This method will be called when Electron has finished
Expand All @@ -165,7 +169,7 @@ app.on('ready', async () => {

if (isMac) {
EIP1559Price.refresh();

autorun(() => {
const { gas } = App.touchBarButtons || {};
if (!gas) return;
Expand Down
20 changes: 20 additions & 0 deletions src/misc/Tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,26 @@ const ARBI_DAI = {

export const ArbiPopularTokens = [ARBI_DAI, ARBI_USDC, ARBI_USDT];

const Boba_USDT = {
address: '0x5DE1677344D3Cb0D7D465c10b72A8f60699C062d',
decimals: 6,
symbol: 'USDT',
};

const Boba_USDC = {
address: '0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc',
decimals: 6,
symbol: 'USDC',
};

const Boba_DAI = {
address: '0xf74195Bb8a5cf652411867c5C2C5b8C2a402be35',
decimals: 18,
symbol: 'DAI',
};

export const BobaPopularTokens = [Boba_DAI, Boba_USDC, Boba_USDT];

const zkSyncTest_USDC = {
address: '0xeb8f08a975Ab53E34D8a0330E0D34de942C95926',
decimals: 6,
Expand Down
1 change: 1 addition & 0 deletions src/misc/Url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const Explorers = new Map<number, string>([
[128, 'https://hecoinfo.com'],
[66, 'https://www.oklink.com/okexchain'],
[10000, 'https://smartbch.org'],
[288, 'https://blockexplorer.boba.network']
]);

export function convertTxToUrl(tx: { chainId: number; hash?: string }) {
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/NetworkLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const SVGs = new Map([
[56, [NetworkIcons('bsc'), 'BSC']],
[66, [NetworkIcons('OKEx'), 'OKEx']],
[10000, [NetworkIcons('SmartBCH'), 'SmartBCH']],
[288, [NetworkIcons('Boba'), 'Boba']],

[1337, [NetworkIcons('Ganache'), 'Ganache']],
]);
Expand Down
4 changes: 4 additions & 0 deletions src/ui/pages/app/DApps123.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
width: calc(100vw / 2 - 12px - 6px - 4px);
}

#root.linux .page.dapps123 > .list > .category > .projects > .project {
width: calc(100vw / 2 - 12px - 6px - 4px);
}

.page.dapps123 > .list > .category > .projects > .project img {
height: 25px;
max-width: 80%;
Expand Down
3 changes: 2 additions & 1 deletion src/ui/pages/app/Swap.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

.page.swap > .swap-container .swap .swapbox {
display: grid;
grid-template-columns: 1fr 100px;
grid-template-columns: 1fr auto;
column-gap: 8px;
border-radius: 7px;
border: 1px solid var(--border-color);
Expand Down Expand Up @@ -140,6 +140,7 @@
.page.swap .token-label {
font-size: 16px;
text-transform: none;
min-width: 100px;
}

.page.swap .token-label img {
Expand Down
2 changes: 1 addition & 1 deletion webpack.rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = [
{
loader: 'url-loader',
options: {
limit: 232768,
limit: 524288,
},
},
],
Expand Down
Loading

0 comments on commit 896c9e4

Please sign in to comment.