Skip to content

tomo-inc/web-sdk-electron-boilerplate

Repository files navigation

Web SDK Electron Boilerplate

This is a boilerplate for Tomo Web SDK, extended from Electron-React-Boilerplate


Electron React Boilerplate uses Electron, React, React Router, Webpack and React Fast Refresh.


Install

Clone the this repo and install dependencies

Starting Development

Start the app in the dev environment:

npm start

Packaging for Production

To package apps for the local platform:

npm run package

Enable Window Open

/** src/main/main.ts */

// ❌ this will break web-sdk's ability to open popup window
// mainWindow.webContents.setWindowOpenHandler((edata) => {
//   shell.openExternal(edata.url);
//   return { action: 'deny' };
// });

// ✅
mainWindow.webContents.setWindowOpenHandler((data) => {
  // Or allow opening in a new window with custom options
  return { 
    action: 'allow',
  }
})

Screenshots

Open Connect

Open Connect

Login Succeed

Login TG

Sign Transaction

Sign Transaction