Skip to content
Permalink
Browse files

Add one template for manifest generation

  • Loading branch information...
bigamasta committed Sep 11, 2019
1 parent ca55342 commit 29c23acf3c9ee031bd362fc5b661c08d1eb1ab6d

Some generated files are not rendered by default. Learn more.

@@ -1,44 +1,6 @@
const SEIZA_URL = process.env.SEIZA_URL || 'http://localhost:3001';
export default {
version: '1.9.0',
name: 'Yoroi',
manifest_version: 2,
export default require('./manifest.template')({
description: 'A simple, secure and fast Cardano ADA wallet.',
browser_action: {
default_title: 'Yoroi',
default_icon: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
},
browser_specific_settings: {
gecko: {
id: '{530f7c6c-6077-4703-8f71-cb368c663e35}',
},
},
icons: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
background: {
page: 'background.html',
},
permissions: ['storage', '*://connect.trezor.io/*'],
content_scripts: [
{
matches: ['*://connect.trezor.io/*/popup.html'],
js: ['js/trezor-content-script.js'],
},
],
content_security_policy:
`default-src 'self'; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval' blob:; connect-src https://iohk-mainnet.yoroiwallet.com wss://iohk-mainnet.yoroiwallet.com:443; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' data:;`,
protocol_handlers: [
{
protocol: 'web+cardano',
name: 'Yoroi',
uriTemplate: 'main_window.html#/send-from-uri?q=%s',
},
],
};
defaultTitle: 'Yoroi',
contentSecurityPolicy: `default-src 'self'; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval' blob:; connect-src https://iohk-mainnet.yoroiwallet.com wss://iohk-mainnet.yoroiwallet.com:443; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' data:;`,
});
@@ -1,45 +1,7 @@
const SEIZA_URL = process.env.SEIZA_URL || 'http://localhost:3001';
export default {
version: '1.9.0',
version_name: 'st-1.9.0',
name: 'Yoroi Staging',
manifest_version: 2,
export default require('./manifest.template')({
description: '[staging] Cardano ADA wallet',
browser_action: {
default_title: '[staging] Yoroi',
default_icon: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
},
browser_specific_settings: {
gecko: {
id: '{530f7c6c-6077-4703-8f71-cb368c663e35}',
},
},
icons: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
background: {
page: 'background.html',
},
permissions: ['storage', '*://connect.trezor.io/*'],
content_scripts: [
{
matches: ['*://connect.trezor.io/*/popup.html'],
js: ['js/trezor-content-script.js'],
},
],
content_security_policy:
`default-src 'self'; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval' blob:; connect-src wss://stg-yoroi-backend.yoroiwallet.com:443 https://stg-yoroi-backend.yoroiwallet.com; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' data:;`,
protocol_handlers: [
{
protocol: 'web+cardano',
name: 'Yoroi',
uriTemplate: 'main_window.html#/send-from-uri?q=%s',
},
],
};
defaultTitle: '[staging] Yoroi',
contentSecurityPolicy: `default-src 'self'; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval' blob:; connect-src wss://stg-yoroi-backend.yoroiwallet.com:443 https://stg-yoroi-backend.yoroiwallet.com; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' data:;`,
version_name: 'st-1.9.0',
});
@@ -0,0 +1,44 @@
export default ({description, defaultTitle, contentSecurityPolicy, versionName }) => ({
version: '1.9.0',
name: 'yoroi',
manifest_version: 2,
...(versionName ? {version_name: versionName } : {}),
description,
browser_action: {
default_title: defaultTitle,
default_icon: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
},
browser_specific_settings: {
gecko: {
id: '{530f7c6c-6077-4703-8f71-cb368c663e35}',
},
},
icons: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
background: {
page: 'background.html',
},
permissions: ['storage', '*://connect.trezor.io/*'],
content_scripts: [
{
matches: ['*://connect.trezor.io/*/popup.html'],
js: ['js/trezor-content-script.js'],
},
],
content_security_policy: contentSecurityPolicy,
key: 'pojejnpjgcacmnpkdiklhlnlbkjechfh',
protocol_handlers: [
{
protocol: 'web+cardano',
name: 'Yoroi',
uriTemplate: 'main_window.html#/send-from-uri?q=%s',
},
],
});
@@ -1,44 +1,8 @@
const SEIZA_URL = process.env.SEIZA_URL || 'http://localhost:3001';
export default {
version: '1.9.0',
name: 'yoroi',
manifest_version: 2,

export default require('./manifest.template')({
description: '[localhost] Cardano ADA wallet',
browser_action: {
default_title: '[localhost] Yoroi',
default_icon: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
},
browser_specific_settings: {
gecko: {
id: '{530f7c6c-6077-4703-8f71-cb368c663e35}',
},
},
icons: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
background: {
page: 'background.html',
},
permissions: ['storage', '*://connect.trezor.io/*'],
content_scripts: [
{
matches: ['*://connect.trezor.io/*/popup.html'],
js: ['js/trezor-content-script.js'],
},
],
content_security_policy:
`default-src 'self'; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval' blob:; connect-src http://localhost:8080 https://localhost:8080 ws://localhost:8080 wss://localhost:8080; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' data:;`,
protocol_handlers: [
{
protocol: 'web+cardano',
name: 'Yoroi',
uriTemplate: 'main_window.html#/send-from-uri?q=%s',
},
],
};
defaultTitle: '[localhost] Yoroi',
contentSecurityPolicy: `default-src 'self'; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval' blob:; connect-src http://localhost:8080 https://localhost:8080 ws://localhost:8080 wss://localhost:8080; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' data:;`,
});

@@ -1,45 +1,7 @@
const SEIZA_URL = process.env.SEIZA_URL || 'http://localhost:3001';
export default {
version: '1.9.0',
version_name: 'tn-1.9.0',
name: 'yoroi',
manifest_version: 2,
export default require('./manifest.template')({
description: '[testnet] Cardano ADA wallet',
browser_action: {
default_title: '[testnet] Yoroi',
default_icon: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
},
browser_specific_settings: {
gecko: {
id: '{530f7c6c-6077-4703-8f71-cb368c663e35}',
},
},
icons: {
16: 'img/icon-16.png',
48: 'img/icon-48.png',
128: 'img/icon-128.png',
},
background: {
page: 'background.html',
},
permissions: ['storage', '*://connect.trezor.io/*'],
content_scripts: [
{
matches: ['*://connect.trezor.io/*/popup.html'],
js: ['js/trezor-content-script.js'],
},
],
content_security_policy:
`default-src 'self'; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval'; connect-src wss://testnet-yoroi-backend.yoroiwallet.com:443 https://testnet-yoroi-backend.yoroiwallet.com; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' data:;`,
protocol_handlers: [
{
protocol: 'web+cardano',
name: 'Yoroi',
uriTemplate: 'main_window.html#/send-from-uri?q=%s',
},
],
};
defaultTitle: '[testnet] Yoroi',
contentSecurityPolicy: `default-src 'self'; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval'; connect-src wss://testnet-yoroi-backend.yoroiwallet.com:443 https://testnet-yoroi-backend.yoroiwallet.com; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' data:;`,
versionName: 'tn-1.9.0',
});

0 comments on commit 29c23ac

Please sign in to comment.
You can’t perform that action at this time.