mirror of
https://github.com/lil-org/tokenary.git
synced 2024-11-26 04:04:20 +03:00
tiny -> big
This commit is contained in:
parent
27049d0490
commit
3c415046fd
@ -5,7 +5,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Wallеt</string>
|
||||
<string>Big Wallet</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIcons</key>
|
||||
@ -32,10 +32,10 @@
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>tinywallet</string>
|
||||
<string>bigwallet</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>tinywallet</string>
|
||||
<string>bigwallet</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
|
@ -239,7 +239,7 @@ class AccountsListViewController: UIViewController, DataStateContainer {
|
||||
|
||||
let action: DappRequestAction
|
||||
let id: Int
|
||||
if let prefix = ["https://lil.org/extension?query=", "tinywallet://safari?request="].first(where: { inputLinkString.hasPrefix($0) == true }),
|
||||
if let prefix = ["https://lil.org/extension?query=", "bigwallet://safari?request="].first(where: { inputLinkString.hasPrefix($0) == true }),
|
||||
let request = SafariRequest(query: String(inputLinkString.dropFirst(prefix.count))) {
|
||||
id = request.id
|
||||
action = DappRequestProcessor.processSafariRequest(request) { [weak self] hash in
|
||||
@ -384,7 +384,7 @@ class AccountsListViewController: UIViewController, DataStateContainer {
|
||||
}
|
||||
|
||||
@objc private func preferencesButtonTapped() {
|
||||
let actionSheet = UIAlertController(title: Strings.tinyWallet, message: nil, preferredStyle: .actionSheet)
|
||||
let actionSheet = UIAlertController(title: Strings.bigWallet, message: nil, preferredStyle: .actionSheet)
|
||||
actionSheet.popoverPresentationController?.barButtonItem = preferencesItem
|
||||
let xAction = UIAlertAction(title: Strings.viewOnX, style: .default) { _ in
|
||||
UIApplication.shared.open(URL.x)
|
||||
|
@ -104,7 +104,7 @@ class Agent: NSObject {
|
||||
}
|
||||
|
||||
lazy private var statusBarMenu: NSMenu = {
|
||||
let menu = NSMenu(title: Strings.tinyWallet)
|
||||
let menu = NSMenu(title: Strings.bigWallet)
|
||||
|
||||
let showItem = NSMenuItem(title: Strings.showWallets, action: #selector(didSelectShowMenuItem), keyEquivalent: "")
|
||||
let safariItem = NSMenuItem(title: Strings.enableSafariExtension, action: #selector(enableSafariExtension), keyEquivalent: "")
|
||||
@ -140,7 +140,7 @@ class Agent: NSObject {
|
||||
func warnBeforeQuitting(updateStatusBarAfterwards: Bool = false) {
|
||||
Window.activateWindow(nil)
|
||||
let alert = Alert()
|
||||
alert.messageText = Strings.quitTinyWallet
|
||||
alert.messageText = Strings.quitWallet
|
||||
alert.alertStyle = .warning
|
||||
alert.addButton(withTitle: Strings.ok)
|
||||
alert.addButton(withTitle: Strings.cancel)
|
||||
|
@ -61,7 +61,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
|
||||
private func processInput(url: String?) {
|
||||
guard let url = url else { return }
|
||||
let safariPrefix = "tinywallet://safari?request="
|
||||
let safariPrefix = "bigwallet://safari?request="
|
||||
if url.hasPrefix(safariPrefix), let request = SafariRequest(query: String(url.dropFirst(safariPrefix.count))) {
|
||||
processExternalRequest(.safari(request))
|
||||
}
|
||||
|
@ -12,11 +12,11 @@
|
||||
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
||||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="tiny wallet" id="1Xt-HY-uBw">
|
||||
<menuItem title="big wallet" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="tiny wallet" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<menu key="submenu" title="big wallet" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About tiny wallet" id="5kV-Vb-QxS">
|
||||
<menuItem title="About big wallet" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
||||
@ -30,7 +30,7 @@
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide tiny wallet" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<menuItem title="Hide big wallet" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
@ -48,7 +48,7 @@
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit tiny wallet" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<menuItem title="Quit big wallet" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="performClose:" target="Ady-hI-5gd" id="W3D-CJ-kQe"/>
|
||||
</connections>
|
||||
@ -661,7 +661,7 @@
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="tiny wallet Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<menuItem title="big wallet Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
@ -1435,7 +1435,7 @@ DQ
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="vxh-AZ-Ll4">
|
||||
<rect key="frame" x="14" y="292" width="222" height="34"/>
|
||||
<textFieldCell key="cell" controlSize="large" alignment="center" title="tiny wallet" id="dja-pE-CfV">
|
||||
<textFieldCell key="cell" controlSize="large" alignment="center" title="big wallet" id="dja-pE-CfV">
|
||||
<font key="font" metaFont="systemHeavy" size="29"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
|
@ -19,7 +19,7 @@ class WelcomeViewController: NSViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
titleLabel.stringValue = Strings.tinyWallet
|
||||
titleLabel.stringValue = Strings.bigWallet
|
||||
messageLabel.stringValue = Strings.welcomeScreenText
|
||||
getStartedButton.title = Strings.getStarted
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Wallеt</string>
|
||||
<string>Big Wallet</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
@ -15,7 +15,7 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Wallet</string>
|
||||
<string>Big Wallet</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
@ -26,10 +26,10 @@
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>tinywallet</string>
|
||||
<string>bigwallet</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>tinywallet</string>
|
||||
<string>bigwallet</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
|
@ -10,7 +10,7 @@ import IdMapping from "./id_mapping";
|
||||
import { EventEmitter } from "events";
|
||||
import isUtf8 from "isutf8";
|
||||
|
||||
class TinyWalletEthereum extends EventEmitter {
|
||||
class BigWalletEthereum extends EventEmitter {
|
||||
|
||||
_metamask = {
|
||||
isUnlocked: () => {
|
||||
@ -31,7 +31,7 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
this._isConnected = true;
|
||||
this._initialized = true;
|
||||
this._isUnlocked = true;
|
||||
this.isTinyWallet = true;
|
||||
this.isBigWallet = true;
|
||||
this.emitConnect(config.chainId);
|
||||
this.didEmitConnectAfterSubscription = false;
|
||||
this.didGetLatestConfiguration = false;
|
||||
@ -41,22 +41,22 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
this.on = (...args) => {
|
||||
if (args[0] == "connect") {
|
||||
setTimeout( function() {
|
||||
if (!window.tinywallet.eth.didEmitConnectAfterSubscription) {
|
||||
window.tinywallet.eth.emitConnect(window.tinywallet.eth.chainId);
|
||||
window.tinywallet.eth.didEmitConnectAfterSubscription = true;
|
||||
if (!window.bigwallet.eth.didEmitConnectAfterSubscription) {
|
||||
window.bigwallet.eth.emitConnect(window.bigwallet.eth.chainId);
|
||||
window.bigwallet.eth.didEmitConnectAfterSubscription = true;
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
return originalOn.apply(this, args);
|
||||
};
|
||||
|
||||
setTimeout( function() { window.tinywallet.eth.emit("_initialized"); }, 1);
|
||||
setTimeout( function() { window.bigwallet.eth.emit("_initialized"); }, 1);
|
||||
}
|
||||
|
||||
externalDisconnect() {
|
||||
this.setAddress("");
|
||||
window.tinywallet.eth.emit("disconnect");
|
||||
window.tinywallet.eth.emit("accountsChanged", []);
|
||||
window.bigwallet.eth.emit("disconnect");
|
||||
window.bigwallet.eth.emit("accountsChanged", []);
|
||||
}
|
||||
|
||||
setAddress(address) {
|
||||
@ -67,22 +67,22 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
}
|
||||
|
||||
updateAccount(eventName, addresses, chainId) {
|
||||
window.tinywallet.eth.setAddress(addresses[0]);
|
||||
window.bigwallet.eth.setAddress(addresses[0]);
|
||||
|
||||
if (eventName == "switchAccount") {
|
||||
window.tinywallet.eth.emit("accountsChanged", addresses);
|
||||
window.bigwallet.eth.emit("accountsChanged", addresses);
|
||||
}
|
||||
|
||||
if (window.tinywallet.eth.rpc.chainId != chainId) {
|
||||
if (window.bigwallet.eth.rpc.chainId != chainId) {
|
||||
this.rpc = new RPCServer(chainId);
|
||||
}
|
||||
|
||||
if (window.tinywallet.eth.chainId != chainId) {
|
||||
window.tinywallet.eth.chainId = chainId;
|
||||
window.tinywallet.eth.networkVersion = this.net_version();
|
||||
if (window.bigwallet.eth.chainId != chainId) {
|
||||
window.bigwallet.eth.chainId = chainId;
|
||||
window.bigwallet.eth.networkVersion = this.net_version();
|
||||
if (eventName != "didLoadLatestConfiguration") {
|
||||
window.tinywallet.eth.emit("chainChanged", chainId);
|
||||
window.tinywallet.eth.emit("networkChanged", window.tinywallet.eth.net_version());
|
||||
window.bigwallet.eth.emit("chainChanged", chainId);
|
||||
window.bigwallet.eth.emit("networkChanged", window.bigwallet.eth.net_version());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -96,8 +96,8 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
|
||||
request(payload) {
|
||||
var that = this;
|
||||
if (!(this instanceof TinyWalletEthereum)) {
|
||||
that = window.tinywallet.eth;
|
||||
if (!(this instanceof BigWalletEthereum)) {
|
||||
that = window.bigwallet.eth;
|
||||
}
|
||||
return that._request(payload, false);
|
||||
}
|
||||
@ -111,7 +111,7 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
}
|
||||
|
||||
enable() {
|
||||
if (!window.tinywallet.eth.address) { // avoid double accounts request in uniswap
|
||||
if (!window.bigwallet.eth.address) { // avoid double accounts request in uniswap
|
||||
return this.request({ method: "eth_requestAccounts", params: [] });
|
||||
} else {
|
||||
return this.request({ method: "eth_accounts", params: [] });
|
||||
@ -120,8 +120,8 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
|
||||
send(payload, callback) {
|
||||
var that = this;
|
||||
if (!(this instanceof TinyWalletEthereum)) {
|
||||
that = window.tinywallet.eth;
|
||||
if (!(this instanceof BigWalletEthereum)) {
|
||||
that = window.bigwallet.eth;
|
||||
}
|
||||
var requestPayload = {};
|
||||
if (typeof payload.method !== "undefined") {
|
||||
@ -143,8 +143,8 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
|
||||
sendAsync(payload, callback) {
|
||||
var that = this;
|
||||
if (!(this instanceof TinyWalletEthereum)) {
|
||||
that = window.tinywallet.eth;
|
||||
if (!(this instanceof BigWalletEthereum)) {
|
||||
that = window.bigwallet.eth;
|
||||
}
|
||||
if (Array.isArray(payload)) {
|
||||
Promise.all(payload.map(that._request.bind(that)))
|
||||
@ -199,7 +199,7 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
case "eth_newPendingTransactionFilter":
|
||||
case "eth_uninstallFilter":
|
||||
case "eth_subscribe":
|
||||
throw new ProviderRpcError(4200, `tiny wallet does not support ${payload.method}`);
|
||||
throw new ProviderRpcError(4200, `big wallet does not support ${payload.method}`);
|
||||
default:
|
||||
return this.rpc.call(payload);
|
||||
}
|
||||
@ -335,7 +335,7 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
this.postMessage("addEthereumChain", payload.id, payload.params[0]);
|
||||
}
|
||||
|
||||
processTinyWalletResponse(id, response) {
|
||||
processBigWalletResponse(id, response) {
|
||||
if (response.name == "didLoadLatestConfiguration") {
|
||||
this.didGetLatestConfiguration = true;
|
||||
if (response.chainId) {
|
||||
@ -376,7 +376,7 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
address: this.address,
|
||||
chainId: this.chainId
|
||||
};
|
||||
window.tinywallet.postMessage(handler, id, object, "ethereum");
|
||||
window.bigwallet.postMessage(handler, id, object, "ethereum");
|
||||
} else {
|
||||
this.sendError(id, new ProviderRpcError(4100, "provider is not ready"));
|
||||
}
|
||||
@ -412,4 +412,4 @@ class TinyWalletEthereum extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TinyWalletEthereum;
|
||||
module.exports = BigWalletEthereum;
|
||||
|
@ -3,24 +3,24 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
import TinyWalletEthereum from "./ethereum";
|
||||
import BigWalletEthereum from "./ethereum";
|
||||
import ProviderRpcError from "./error";
|
||||
|
||||
window.tinywallet = {};
|
||||
window.tinywallet.postMessage = (name, id, body, provider) => {
|
||||
window.bigwallet = {};
|
||||
window.bigwallet.postMessage = (name, id, body, provider) => {
|
||||
const message = {name: name, id: id, provider: provider, body: body};
|
||||
window.postMessage({direction: "from-page-script", message: message}, "*");
|
||||
};
|
||||
|
||||
window.tinywallet.disconnect = (provider) => {
|
||||
window.bigwallet.disconnect = (provider) => {
|
||||
const disconnectRequest = {subject: "disconnect", provider: provider};
|
||||
window.postMessage(disconnectRequest, "*");
|
||||
};
|
||||
|
||||
// - MARK: Ethereum
|
||||
|
||||
let provider = new TinyWalletEthereum();
|
||||
window.tinywallet.eth = provider;
|
||||
let provider = new BigWalletEthereum();
|
||||
window.bigwallet.eth = provider;
|
||||
window.ethereum = provider;
|
||||
window.web3 = {currentProvider: provider};
|
||||
window.metamask = provider;
|
||||
@ -30,8 +30,8 @@ window.dispatchEvent(new Event('ethereum#initialized'));
|
||||
|
||||
function announceProvider() {
|
||||
const info = {
|
||||
uuid: "bcce26fb-e330-425c-9d21-43ed52e98fcf",
|
||||
name: "tiny wallet",
|
||||
uuid: "08ac99d0-ec2b-4088-8599-c9f7eede344e",
|
||||
name: "big wallet",
|
||||
icon: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgdmlld0JveD0iMCAwIDI1NiAyNTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjA5Ljc1IDEyOEMyMDkuNzUgODIuODUwOCAxNzMuMTQ5IDQ2LjI1IDEyOCA0Ni4yNUM4Mi44NTA4IDQ2LjI1IDQ2LjI1IDgyLjg1MDggNDYuMjUgMTI4QzQ2LjI1IDE3My4xNDkgODIuODUwOCAyMDkuNzUgMTI4IDIwOS43NUMxNzMuMTQ5IDIwOS43NSAyMDkuNzUgMTczLjE0OSAyMDkuNzUgMTI4WiIgZmlsbD0idXJsKCNwYWludDBfcmFkaWFsXzIwMzRfMjIpIi8+CjxwYXRoIGQ9Ik0xMjguMDAxIDQ3LjA2NzRDMTcyLjYzNiA0Ny4wNjc0IDIwOC45MzMgODMuMzY0NCAyMDguOTMzIDEyOEMyMDguOTMzIDE3Mi42MzUgMTcyLjYzNiAyMDguOTMyIDEyOC4wMDEgMjA4LjkzMkM4My4zNjU0IDIwOC45MzIgNDcuMDY4NCAxNzIuNjM1IDQ3LjA2ODQgMTI4QzQ3LjA2ODQgODMuMzY0NCA4My4zNjU0IDQ3LjA2NzQgMTI4LjAwMSA0Ny4wNjc0WiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLW9wYWNpdHk9IjAuMDc1Ii8+CjxkZWZzPgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50MF9yYWRpYWxfMjAzNF8yMiIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgxNTQuOTA5IDg2LjA3NDUpIHNjYWxlKDEyMy4xKSI+CjxzdG9wIG9mZnNldD0iMC4xNTYyIiBzdG9wLWNvbG9yPSIjQzZFNkY1Ii8+CjxzdG9wIG9mZnNldD0iMC4zOTU4IiBzdG9wLWNvbG9yPSIjQTNEMkYwIi8+CjxzdG9wIG9mZnNldD0iMC43MjkyIiBzdG9wLWNvbG9yPSIjNUY4QUU3Ii8+CjxzdG9wIG9mZnNldD0iMC45MDYzIiBzdG9wLWNvbG9yPSIjMUQ0OUU3Ii8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE0MzhFQiIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo=',
|
||||
rdns: "org.lil.wallet"
|
||||
};
|
||||
@ -45,7 +45,7 @@ announceProvider();
|
||||
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.source == window && event.data && event.data.direction == "rpc-back") {
|
||||
provider.processTinyWalletResponse(event.data.response.id, event.data.response);
|
||||
provider.processBigWalletResponse(event.data.response.id, event.data.response);
|
||||
} else if (event.source == window && event.data && event.data.direction == "from-content-script") {
|
||||
const response = event.data.response;
|
||||
const id = event.data.id;
|
||||
@ -72,7 +72,7 @@ window.addEventListener("message", function(event) {
|
||||
function deliverResponseToSpecificProvider(id, response, providerName) {
|
||||
switch (providerName) {
|
||||
case "ethereum":
|
||||
provider.processTinyWalletResponse(id, response);
|
||||
provider.processBigWalletResponse(id, response);
|
||||
break;
|
||||
case "multiple":
|
||||
response.bodies.forEach((body) => {
|
||||
@ -94,6 +94,6 @@ function deliverResponseToSpecificProvider(id, response, providerName) {
|
||||
break;
|
||||
default:
|
||||
// pass unknown provider message to all providers
|
||||
provider.processTinyWalletResponse(id, response);
|
||||
provider.processBigWalletResponse(id, response);
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/lil-org/tiny-wallet.git"
|
||||
"url": "git+ssh://git@github.com/lil-org/big-wallet.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "lil org <yo@lil.org>",
|
||||
|
@ -74,7 +74,7 @@ function injectScript() {
|
||||
container.insertBefore(scriptTag, container.children[0]);
|
||||
container.removeChild(scriptTag);
|
||||
} catch (error) {
|
||||
console.error('tiny wallet: failed to inject', error);
|
||||
console.error('big wallet: failed to inject', error);
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -126,7 +126,7 @@ function onBeforeExtensionPageNavigation(details) {
|
||||
if (details.url.includes("lil.org/extension?query=")) {
|
||||
const queryStringIndex = details.url.indexOf("?query=") + 7;
|
||||
const encodedQuery = details.url.substring(queryStringIndex);
|
||||
browser.tabs.update(details.tabId, { url: "tinywallet://safari?request=" + encodedQuery });
|
||||
browser.tabs.update(details.tabId, { url: "bigwallet://safari?request=" + encodedQuery });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
|
||||
}
|
||||
} else if let query = String(data: data, encoding: .utf8)?.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
|
||||
let request = SafariRequest(query: query),
|
||||
let url = URL(string: "tinywallet://safari?request=\(query)") {
|
||||
let url = URL(string: "bigwallet://safari?request=\(query)") {
|
||||
if case let .ethereum(ethereumRequest) = request.body,
|
||||
ethereumRequest.method == .switchEthereumChain || ethereumRequest.method == .addEthereumChain {
|
||||
// TODO: different processing for addEthereumChain
|
||||
|
@ -15,7 +15,7 @@ class ConfigurationService {
|
||||
}
|
||||
|
||||
private func getInfuraKeysFromCloudKit(completion: @escaping ([String]) -> Void) {
|
||||
let container = CKContainer(identifier: "iCloud.tinywallet")
|
||||
let container = CKContainer(identifier: "iCloud.tinywallet") // TODO: recreate icloud container
|
||||
let publicDatabase = container.publicCloudDatabase
|
||||
let predicate = NSPredicate(value: true)
|
||||
let query = CKQuery(recordType: "Config", predicate: predicate)
|
||||
|
@ -843,12 +843,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"tiny wallet" : {
|
||||
"big wallet" : {
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "tiny wallet"
|
||||
"value" : "big wallet"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,11 +15,11 @@ struct Strings {
|
||||
static let failedToSend = loc("Failed to send")
|
||||
static let failedToSign = loc("Failed to sign")
|
||||
static let failedToSwitchChain = loc("Failed to switch chain")
|
||||
static let tinyWallet = loc("tiny wallet")
|
||||
static let bigWallet = loc("big wallet")
|
||||
static let showWallets = loc("Show Wallets")
|
||||
static let enterWallet = loc("Enter Wallet")
|
||||
static let quit = loc("Quit")
|
||||
static let quitTinyWallet = loc("Quit Wallet?")
|
||||
static let quitWallet = loc("Quit Wallet?")
|
||||
static let enableSafariExtension = loc("Enable Safari Extension")
|
||||
static let dropUsALine = loc("yo@lil.org")
|
||||
static let viewOnGithub = loc("github")
|
||||
|
Loading…
Reference in New Issue
Block a user