View on GitHub
File Changes
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: '[dev] Cardano ADA wallet',
-
  browser_action: {
-
    default_title: '[dev] 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' http://localhost:3000 https://localhost:3000 http://localhost:8097; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval' http://localhost:3000 https://localhost:3000 http://localhost:8097 blob:; object-src 'self'; connect-src https://iohk-mainnet.yoroiwallet.com wss://iohk-mainnet.yoroiwallet.com:443 http://localhost:3000 https://localhost:3000 http://localhost:8080 https://localhost:8080 http://localhost:8097 ws://localhost:8080 ws://localhost:8097 wss://localhost:8080 wss://testnet-yoroi-backend.yoroiwallet.com:443 https://testnet-yoroi-backend.yoroiwallet.com; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' http://localhost:3000 data:;`,
-
  key: 'pojejnpjgcacmnpkdiklhlnlbkjechfh',
-
  protocol_handlers: [
-
    {
-
      protocol: 'web+cardano',
-
      name: 'Yoroi',
-
      uriTemplate: 'main_window.html#/send-from-uri?q=%s',
-
    },
-
  ],
-
};
+
  defaultTitle: '[dev] Yoroi',
+
  contentSecurityPolicy: `default-src 'self' http://localhost:3000 https://localhost:3000 http://localhost:8097; frame-src ${SEIZA_URL} https://connect.trezor.io/ https://emurgo.github.io/yoroi-extension-ledger-bridge; script-src 'self' 'unsafe-eval' http://localhost:3000 https://localhost:3000 http://localhost:8097 blob:; object-src 'self'; connect-src https://iohk-mainnet.yoroiwallet.com wss://iohk-mainnet.yoroiwallet.com:443 http://localhost:3000 https://localhost:3000 http://localhost:8080 https://localhost:8080 http://localhost:8097 ws://localhost:8080 ws://localhost:8097 wss://localhost:8080 wss://testnet-yoroi-backend.yoroiwallet.com:443 https://testnet-yoroi-backend.yoroiwallet.com; style-src * 'unsafe-inline' 'self' blob:; img-src 'self' http://localhost:3000 data:;`
+
});
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:;`,
+
});
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',
+
});
+
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',
+
    },
+
  ],
+
});
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:;`,
+
});
+

                      
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',
+
});