@pooltogether/bnc-onboard
Version:
Onboard users to web3 by allowing them to select a wallet, get that wallet ready to transact and have access to synced wallet state.
17 lines (14 loc) • 2.08 kB
JavaScript
var extensionInstallMessage = function extensionInstallMessage(helpers) {
var currentWallet = helpers.currentWallet,
selectedWallet = helpers.selectedWallet;
if (currentWallet) {
return "\n <p style=\"font-size: 0.889rem; font-family: inherit; margin: 0.889rem 0;\">\n We have detected that you already have\n <b>".concat(currentWallet, "</b>\n installed. If you would prefer to use\n <b>").concat(selectedWallet, "</b>\n instead, then click below to install.\n </p>\n <p style=\"font-size: 0.889rem; font-family: inherit; margin: 0.889rem 0;\">\n <b>Tip:</b>\n If you already have ").concat(selectedWallet, " installed, check your\n browser extension settings to make sure that you have it enabled\n and that you have disabled any other browser extension wallets.\n <span\n class=\"bn-onboard-clickable\"\n style=\"color: #4a90e2; font-size: 0.889rem; font-family: inherit;\"\n onclick=\"window.location.reload();\">\n Then refresh the page.\n </span>\n </p>\n ");
} else {
return "\n <p style=\"font-size: 0.889rem; font-family: inherit; margin: 0.889rem 0;\">\n You'll need to open or install <b>".concat(selectedWallet, "</b> to continue.\n ").concat(selectedWallet === 'Opera' ? '<br><br><i>Hint: If you already have Opera installed, make sure that your web3 wallet is <a style="color: #4a90e2; font-size: 0.889rem; font-family: inherit;" class="bn-onboard-clickable" href="https://help.opera.com/en/touch/crypto-wallet/" rel="noreferrer noopener" target="_blank">enabled</a></i>' : '', "\n </p>\n ");
}
};
var mobileWalletInstallMessage = function mobileWalletInstallMessage(helpers) {
var selectedWallet = helpers.selectedWallet;
return "\n <p style=\"font-size: 0.889rem;\">\n Tap the button below to <b>Open or Install ".concat(selectedWallet, "</b>. Click below to open PoolTogether with ").concat(selectedWallet, "'s in-app browser for a seamless experience.\n </p>\n ");
};
export { extensionInstallMessage as e, mobileWalletInstallMessage as m };