Skip to content

Commit c1c2b75

Browse files
committed
add fujicoin
1 parent 1b0a119 commit c1c2b75

File tree

16 files changed

+91
-7
lines changed

16 files changed

+91
-7
lines changed

packages/blockchain-link/src/ui/config.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,29 @@ export default [
322322
subscribe: '',
323323
},
324324
},
325+
{
326+
blockchain: {
327+
name: 'Fujicoin',
328+
worker: 'js/blockbook-worker.js',
329+
server: [
330+
'https://explorer.fujicoin.org',
331+
],
332+
debug: true,
333+
},
334+
data: {
335+
address: '',
336+
accountInfoOptions: {
337+
page: 0,
338+
pageSize: 25,
339+
},
340+
estimateFeeOptions: {
341+
blocks: [1, 2, 10],
342+
},
343+
txid: '',
344+
tx: '',
345+
subscribe: '',
346+
},
347+
},
325348
{
326349
blockchain: {
327350
name: 'Litecoin',

packages/blockchain-link/src/workers/electrum/client/electrum.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ type ElectrumClientOptions = JsonRpcClientOptions & {
1717

1818
const selectNetwork = (shortcut?: string) => {
1919
switch (shortcut) {
20+
case 'FJC':
21+
return networks.fujicoin;
2022
case 'REGTEST':
2123
return networks.regtest;
2224
case 'TEST':

packages/components/src/components/CoinLogo/coins.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const COINS = {
1313
eos: require('../../images/coins/eos.svg'),
1414
etc: require('../../images/coins/etc.svg'),
1515
eth: require('../../images/coins/eth.svg'),
16+
fjc: require('../../images/coins/fjc.svg'),
1617
ltc: require('../../images/coins/ltc.svg'),
1718
nmc: require('../../images/coins/nmc.svg'),
1819
tada: require('../../images/coins/tada.svg'),
Lines changed: 1 addition & 0 deletions
Loading

packages/connect-common/files/coins.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,10 @@
10981098
"bech32_prefix": "fc",
10991099
"blockchain_link": {
11001100
"type": "blockbook",
1101-
"url": ["https://explorer.fujicoin.org"]
1101+
"url": [
1102+
"https://explorer.fujicoin.org",
1103+
"https://explorer2.fujicoin.org"
1104+
]
11021105
},
11031106
"blocktime_seconds": 60,
11041107
"cashaddr_prefix": null,
Loading

packages/suite-desktop-core/src/modules/auto-updater.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const updaterURL = app.commandLine.getSwitchValue('updater-url');
3232
export const SERVICE_NAME = 'auto-updater';
3333

3434
export const init: Module = ({ mainWindow, store }) => {
35+
return;
36+
3537
const { logger } = global;
3638
if (!isFeatureFlagEnabled('DESKTOP_AUTO_UPDATER') && !enableUpdater) {
3739
logger.info(SERVICE_NAME, 'Disabled via feature flag');

packages/suite-desktop/electron-builder-config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ const isCodesignBuild = process.env.IS_CODESIGN_BUILD === 'true';
66
// to be able to use patterns like ${author} and ${arch}
77
module.exports = {
88
// distingush between dev and prod builds
9-
appId: `io.trezor.TrezorSuite${isCodesignBuild ? '' : '.dev'}`,
9+
appId: `fujicoin.org.TrezorSuite${isCodesignBuild ? '' : '.dev'}`,
1010
extraMetadata: {
1111
version: suiteVersion,
1212
// distingush between dev and prod builds so different userDataDir is used
1313
name: `@trezor/suite-desktop${isCodesignBuild ? '' : '-dev'}`,
1414
},
15-
productName: 'Trezor Suite',
15+
productName: 'Fujicoin Trezor Suite',
1616
copyright: 'Copyright © ${author}',
1717
asar: true,
1818
asarUnpack: ['**/*.node'],
@@ -92,7 +92,7 @@ module.exports = {
9292
},
9393
],
9494
icon: 'build/static/images/desktop/512x512.icns',
95-
artifactName: 'Trezor-Suite-${version}-mac-${arch}.${ext}',
95+
artifactName: 'Fujicoin-Trezor-Suite-${version}-mac-${arch}.${ext}',
9696
hardenedRuntime: true,
9797
gatekeeperAssess: false,
9898
darkModeSupport: true,
@@ -126,7 +126,7 @@ module.exports = {
126126
},
127127
],
128128
icon: 'build/static/images/desktop/512x512.png',
129-
artifactName: 'Trezor-Suite-${version}-win-${arch}.${ext}',
129+
artifactName: 'Fujicoin-Trezor-Suite-${version}-win-${arch}.${ext}',
130130
target: ['nsis'],
131131
signDlls: true,
132132
sign: '../suite-desktop-core/scripts/sign-windows.ts',
@@ -151,8 +151,8 @@ module.exports = {
151151
},
152152
],
153153
icon: 'build/static/images/desktop/512x512.png',
154-
artifactName: 'Trezor-Suite-${version}-linux-${arch}.${ext}',
155-
executableName: 'trezor-suite',
154+
artifactName: 'Fujicoin-Trezor-Suite-${version}-linux-${arch}.${ext}',
155+
executableName: 'fujicoin-trezor-suite',
156156
category: 'Utility',
157157
target: ['AppImage'],
158158
},

packages/suite-desktop/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@
3636
"glob": "^10.3.10"
3737
}
3838
}
39+

packages/suite/src/constants/suite/protocol.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { NetworkCompatible } from '@suite-common/wallet-config';
33
export enum PROTOCOL_SCHEME {
44
BITCOIN = 'bitcoin',
55
LITECOIN = 'litecoin',
6+
FUJICOIN = 'fujicoin',
67
BITCOIN_CASH = 'bitcoincash',
78
BITCOIN_GOLD = 'bitcoingold',
89
DASH = 'dash',
@@ -23,6 +24,7 @@ export const PROTOCOL_TO_NETWORK: Partial<{
2324
}> = {
2425
[PROTOCOL_SCHEME.BITCOIN]: 'btc',
2526
[PROTOCOL_SCHEME.LITECOIN]: 'ltc',
27+
[PROTOCOL_SCHEME.FUJICOIN]: 'fjc',
2628
[PROTOCOL_SCHEME.BITCOIN_CASH]: 'bch',
2729
[PROTOCOL_SCHEME.BITCOIN_GOLD]: 'btg',
2830
[PROTOCOL_SCHEME.DASH]: 'dash',

packages/suite/src/support/messages.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2879,6 +2879,10 @@ export default defineMessages({
28792879
defaultMessage: 'BNB Smart Chain',
28802880
id: 'TR_NETWORK_BNB',
28812881
},
2882+
TR_NETWORK_FUJICOIN: {
2883+
defaultMessage: 'Fujicoin',
2884+
id: 'TR_NETWORK_FUJICOIN',
2885+
},
28822886
TR_NETWORK_LITECOIN: {
28832887
defaultMessage: 'Litecoin',
28842888
id: 'TR_NETWORK_LITECOIN',

packages/utxo-lib/src/networks.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ export const bitcoingold: Network = {
9696
forkId: 0x4f /* 79 */,
9797
};
9898

99+
export const fujicoin: Network = {
100+
messagePrefix: '\x19FujiCoin Signed Message:\n',
101+
bech32: 'fc',
102+
bip32: {
103+
public: 0x0488b21e,
104+
private: 0x0488ade4,
105+
},
106+
pubKeyHash: 0x24,
107+
scriptHash: 0x10,
108+
wif: 0xa4,
109+
};
110+
99111
export const litecoin: Network = {
100112
messagePrefix: '\x19Litecoin Signed Message:\n',
101113
bech32: 'ltc',

suite-common/suite-constants/src/protocol.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { NetworkSymbol } from '@suite-common/wallet-config';
33
export enum PROTOCOL_SCHEME {
44
BITCOIN = 'bitcoin',
55
LITECOIN = 'litecoin',
6+
FUJICOIN = 'fujicoin',
67
BITCOIN_CASH = 'bitcoincash',
78
BITCOIN_GOLD = 'bitcoingold',
89
DASH = 'dash',

suite-common/wallet-config/src/networksConfig.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,35 @@ export const networks = {
4545
coingeckoId: 'bitcoin',
4646
coingeckoNativeId: 'bitcoin',
4747
},
48+
fjc: {
49+
name: 'Fujicoin',
50+
networkType: 'bitcoin',
51+
bip43Path: "m/84'/75'/i'",
52+
decimals: 8,
53+
testnet: false,
54+
explorer: {
55+
tx: 'https://explorer.fujicoin.org/tx/',
56+
account: 'https://explorer.fujicoin.org/xpub/',
57+
address: 'https://explorer.fujicoin.org/address/',
58+
},
59+
features: ['rbf', 'sign-verify'],
60+
customBackends: ['blockbook', 'electrum'],
61+
accountTypes: {
62+
taproot: {
63+
name: 'Fujicoin (Taproot)',
64+
bip43Path: "m/86'/75'/i'",
65+
features: ['rbf'],
66+
},
67+
segwit: {
68+
name: 'Fujicoin (Legacy Segwit)',
69+
bip43Path: "m/49'/75'/i'",
70+
},
71+
legacy: {
72+
name: 'Fujicoin (Legacy)',
73+
bip43Path: "m/44'/75'/i'",
74+
},
75+
},
76+
},
4877
ltc: {
4978
symbol: 'ltc',
5079
name: 'Litecoin',

suite-common/wallet-utils/src/__fixtures__/accountUtils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export const accountTitleFixture = [
6464
{ symbol: 'eth', title: 'TR_NETWORK_ETHEREUM' },
6565
{ symbol: 'bnb', title: 'TR_NETWORK_BNB' },
6666
{ symbol: 'etc', title: 'TR_NETWORK_ETHEREUM_CLASSIC' },
67+
{ symbol: 'fjc', title: 'TR_NETWORK_FUJICOIN' },
6768
{ symbol: 'xem', title: 'TR_NETWORK_NEM' },
6869
{ symbol: 'xlm', title: 'TR_NETWORK_STELLAR' },
6970
{ symbol: 'ada', title: 'TR_NETWORK_CARDANO' },

suite-common/wallet-utils/src/accountUtils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ export const getTitleForNetwork = (symbol: NetworkSymbol) => {
155155
return 'TR_NETWORK_ETHEREUM';
156156
case 'bnb':
157157
return 'TR_NETWORK_BNB';
158+
case 'fjc':
159+
return 'TR_NETWORK_FUJICOIN';
158160
case 'tsep':
159161
return 'TR_NETWORK_ETHEREUM_SEPOLIA';
160162
case 'thol':

0 commit comments

Comments
 (0)