tiny -> big

This commit is contained in:
ivan grachev 2024-05-07 13:11:54 +03:00
parent 27049d0490
commit 3c415046fd
17 changed files with 69 additions and 69 deletions

View File

@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Wallеt</string> <string>Big Wallet</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIcons</key> <key>CFBundleIcons</key>
@ -32,10 +32,10 @@
<key>CFBundleTypeRole</key> <key>CFBundleTypeRole</key>
<string>Viewer</string> <string>Viewer</string>
<key>CFBundleURLName</key> <key>CFBundleURLName</key>
<string>tinywallet</string> <string>bigwallet</string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>tinywallet</string> <string>bigwallet</string>
</array> </array>
</dict> </dict>
</array> </array>

View File

@ -239,7 +239,7 @@ class AccountsListViewController: UIViewController, DataStateContainer {
let action: DappRequestAction let action: DappRequestAction
let id: Int 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))) { let request = SafariRequest(query: String(inputLinkString.dropFirst(prefix.count))) {
id = request.id id = request.id
action = DappRequestProcessor.processSafariRequest(request) { [weak self] hash in action = DappRequestProcessor.processSafariRequest(request) { [weak self] hash in
@ -384,7 +384,7 @@ class AccountsListViewController: UIViewController, DataStateContainer {
} }
@objc private func preferencesButtonTapped() { @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 actionSheet.popoverPresentationController?.barButtonItem = preferencesItem
let xAction = UIAlertAction(title: Strings.viewOnX, style: .default) { _ in let xAction = UIAlertAction(title: Strings.viewOnX, style: .default) { _ in
UIApplication.shared.open(URL.x) UIApplication.shared.open(URL.x)

View File

@ -104,7 +104,7 @@ class Agent: NSObject {
} }
lazy private var statusBarMenu: NSMenu = { 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 showItem = NSMenuItem(title: Strings.showWallets, action: #selector(didSelectShowMenuItem), keyEquivalent: "")
let safariItem = NSMenuItem(title: Strings.enableSafariExtension, action: #selector(enableSafariExtension), keyEquivalent: "") let safariItem = NSMenuItem(title: Strings.enableSafariExtension, action: #selector(enableSafariExtension), keyEquivalent: "")
@ -140,7 +140,7 @@ class Agent: NSObject {
func warnBeforeQuitting(updateStatusBarAfterwards: Bool = false) { func warnBeforeQuitting(updateStatusBarAfterwards: Bool = false) {
Window.activateWindow(nil) Window.activateWindow(nil)
let alert = Alert() let alert = Alert()
alert.messageText = Strings.quitTinyWallet alert.messageText = Strings.quitWallet
alert.alertStyle = .warning alert.alertStyle = .warning
alert.addButton(withTitle: Strings.ok) alert.addButton(withTitle: Strings.ok)
alert.addButton(withTitle: Strings.cancel) alert.addButton(withTitle: Strings.cancel)

View File

@ -61,7 +61,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
private func processInput(url: String?) { private func processInput(url: String?) {
guard let url = url else { return } 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))) { if url.hasPrefix(safariPrefix), let request = SafariRequest(query: String(url.dropFirst(safariPrefix.count))) {
processExternalRequest(.safari(request)) processExternalRequest(.safari(request))
} }

View File

@ -12,11 +12,11 @@
<application id="hnw-xV-0zn" sceneMemberID="viewController"> <application id="hnw-xV-0zn" sceneMemberID="viewController">
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6"> <menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items> <items>
<menuItem title="tiny wallet" id="1Xt-HY-uBw"> <menuItem title="big wallet" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/> <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> <items>
<menuItem title="About tiny wallet" id="5kV-Vb-QxS"> <menuItem title="About big wallet" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
<connections> <connections>
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/> <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"/> <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem> </menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/> <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> <connections>
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/> <action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
</connections> </connections>
@ -48,7 +48,7 @@
</connections> </connections>
</menuItem> </menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/> <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> <connections>
<action selector="performClose:" target="Ady-hI-5gd" id="W3D-CJ-kQe"/> <action selector="performClose:" target="Ady-hI-5gd" id="W3D-CJ-kQe"/>
</connections> </connections>
@ -661,7 +661,7 @@
<modifierMask key="keyEquivalentModifierMask"/> <modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ"> <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items> <items>
<menuItem title="tiny wallet Help" keyEquivalent="?" id="FKE-Sm-Kum"> <menuItem title="big wallet Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections> <connections>
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/> <action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
</connections> </connections>
@ -1435,7 +1435,7 @@ DQ
<subviews> <subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="vxh-AZ-Ll4"> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="vxh-AZ-Ll4">
<rect key="frame" x="14" y="292" width="222" height="34"/> <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"/> <font key="font" metaFont="systemHeavy" size="29"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>

View File

@ -19,7 +19,7 @@ class WelcomeViewController: NSViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
titleLabel.stringValue = Strings.tinyWallet titleLabel.stringValue = Strings.bigWallet
messageLabel.stringValue = Strings.welcomeScreenText messageLabel.stringValue = Strings.welcomeScreenText
getStartedButton.title = Strings.getStarted getStartedButton.title = Strings.getStarted
} }

View File

@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Wallеt</string> <string>Big Wallet</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
@ -15,7 +15,7 @@
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>Wallet</string> <string>Big Wallet</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
@ -26,10 +26,10 @@
<key>CFBundleTypeRole</key> <key>CFBundleTypeRole</key>
<string>Viewer</string> <string>Viewer</string>
<key>CFBundleURLName</key> <key>CFBundleURLName</key>
<string>tinywallet</string> <string>bigwallet</string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>tinywallet</string> <string>bigwallet</string>
</array> </array>
</dict> </dict>
</array> </array>

View File

@ -10,7 +10,7 @@ import IdMapping from "./id_mapping";
import { EventEmitter } from "events"; import { EventEmitter } from "events";
import isUtf8 from "isutf8"; import isUtf8 from "isutf8";
class TinyWalletEthereum extends EventEmitter { class BigWalletEthereum extends EventEmitter {
_metamask = { _metamask = {
isUnlocked: () => { isUnlocked: () => {
@ -31,7 +31,7 @@ class TinyWalletEthereum extends EventEmitter {
this._isConnected = true; this._isConnected = true;
this._initialized = true; this._initialized = true;
this._isUnlocked = true; this._isUnlocked = true;
this.isTinyWallet = true; this.isBigWallet = true;
this.emitConnect(config.chainId); this.emitConnect(config.chainId);
this.didEmitConnectAfterSubscription = false; this.didEmitConnectAfterSubscription = false;
this.didGetLatestConfiguration = false; this.didGetLatestConfiguration = false;
@ -41,22 +41,22 @@ class TinyWalletEthereum extends EventEmitter {
this.on = (...args) => { this.on = (...args) => {
if (args[0] == "connect") { if (args[0] == "connect") {
setTimeout( function() { setTimeout( function() {
if (!window.tinywallet.eth.didEmitConnectAfterSubscription) { if (!window.bigwallet.eth.didEmitConnectAfterSubscription) {
window.tinywallet.eth.emitConnect(window.tinywallet.eth.chainId); window.bigwallet.eth.emitConnect(window.bigwallet.eth.chainId);
window.tinywallet.eth.didEmitConnectAfterSubscription = true; window.bigwallet.eth.didEmitConnectAfterSubscription = true;
} }
}, 1); }, 1);
} }
return originalOn.apply(this, args); return originalOn.apply(this, args);
}; };
setTimeout( function() { window.tinywallet.eth.emit("_initialized"); }, 1); setTimeout( function() { window.bigwallet.eth.emit("_initialized"); }, 1);
} }
externalDisconnect() { externalDisconnect() {
this.setAddress(""); this.setAddress("");
window.tinywallet.eth.emit("disconnect"); window.bigwallet.eth.emit("disconnect");
window.tinywallet.eth.emit("accountsChanged", []); window.bigwallet.eth.emit("accountsChanged", []);
} }
setAddress(address) { setAddress(address) {
@ -67,22 +67,22 @@ class TinyWalletEthereum extends EventEmitter {
} }
updateAccount(eventName, addresses, chainId) { updateAccount(eventName, addresses, chainId) {
window.tinywallet.eth.setAddress(addresses[0]); window.bigwallet.eth.setAddress(addresses[0]);
if (eventName == "switchAccount") { 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); this.rpc = new RPCServer(chainId);
} }
if (window.tinywallet.eth.chainId != chainId) { if (window.bigwallet.eth.chainId != chainId) {
window.tinywallet.eth.chainId = chainId; window.bigwallet.eth.chainId = chainId;
window.tinywallet.eth.networkVersion = this.net_version(); window.bigwallet.eth.networkVersion = this.net_version();
if (eventName != "didLoadLatestConfiguration") { if (eventName != "didLoadLatestConfiguration") {
window.tinywallet.eth.emit("chainChanged", chainId); window.bigwallet.eth.emit("chainChanged", chainId);
window.tinywallet.eth.emit("networkChanged", window.tinywallet.eth.net_version()); window.bigwallet.eth.emit("networkChanged", window.bigwallet.eth.net_version());
} }
} }
} }
@ -96,8 +96,8 @@ class TinyWalletEthereum extends EventEmitter {
request(payload) { request(payload) {
var that = this; var that = this;
if (!(this instanceof TinyWalletEthereum)) { if (!(this instanceof BigWalletEthereum)) {
that = window.tinywallet.eth; that = window.bigwallet.eth;
} }
return that._request(payload, false); return that._request(payload, false);
} }
@ -111,7 +111,7 @@ class TinyWalletEthereum extends EventEmitter {
} }
enable() { 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: [] }); return this.request({ method: "eth_requestAccounts", params: [] });
} else { } else {
return this.request({ method: "eth_accounts", params: [] }); return this.request({ method: "eth_accounts", params: [] });
@ -120,8 +120,8 @@ class TinyWalletEthereum extends EventEmitter {
send(payload, callback) { send(payload, callback) {
var that = this; var that = this;
if (!(this instanceof TinyWalletEthereum)) { if (!(this instanceof BigWalletEthereum)) {
that = window.tinywallet.eth; that = window.bigwallet.eth;
} }
var requestPayload = {}; var requestPayload = {};
if (typeof payload.method !== "undefined") { if (typeof payload.method !== "undefined") {
@ -143,8 +143,8 @@ class TinyWalletEthereum extends EventEmitter {
sendAsync(payload, callback) { sendAsync(payload, callback) {
var that = this; var that = this;
if (!(this instanceof TinyWalletEthereum)) { if (!(this instanceof BigWalletEthereum)) {
that = window.tinywallet.eth; that = window.bigwallet.eth;
} }
if (Array.isArray(payload)) { if (Array.isArray(payload)) {
Promise.all(payload.map(that._request.bind(that))) Promise.all(payload.map(that._request.bind(that)))
@ -199,7 +199,7 @@ class TinyWalletEthereum extends EventEmitter {
case "eth_newPendingTransactionFilter": case "eth_newPendingTransactionFilter":
case "eth_uninstallFilter": case "eth_uninstallFilter":
case "eth_subscribe": 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: default:
return this.rpc.call(payload); return this.rpc.call(payload);
} }
@ -335,7 +335,7 @@ class TinyWalletEthereum extends EventEmitter {
this.postMessage("addEthereumChain", payload.id, payload.params[0]); this.postMessage("addEthereumChain", payload.id, payload.params[0]);
} }
processTinyWalletResponse(id, response) { processBigWalletResponse(id, response) {
if (response.name == "didLoadLatestConfiguration") { if (response.name == "didLoadLatestConfiguration") {
this.didGetLatestConfiguration = true; this.didGetLatestConfiguration = true;
if (response.chainId) { if (response.chainId) {
@ -376,7 +376,7 @@ class TinyWalletEthereum extends EventEmitter {
address: this.address, address: this.address,
chainId: this.chainId chainId: this.chainId
}; };
window.tinywallet.postMessage(handler, id, object, "ethereum"); window.bigwallet.postMessage(handler, id, object, "ethereum");
} else { } else {
this.sendError(id, new ProviderRpcError(4100, "provider is not ready")); this.sendError(id, new ProviderRpcError(4100, "provider is not ready"));
} }
@ -412,4 +412,4 @@ class TinyWalletEthereum extends EventEmitter {
} }
} }
module.exports = TinyWalletEthereum; module.exports = BigWalletEthereum;

View File

@ -3,24 +3,24 @@
"use strict"; "use strict";
import TinyWalletEthereum from "./ethereum"; import BigWalletEthereum from "./ethereum";
import ProviderRpcError from "./error"; import ProviderRpcError from "./error";
window.tinywallet = {}; window.bigwallet = {};
window.tinywallet.postMessage = (name, id, body, provider) => { window.bigwallet.postMessage = (name, id, body, provider) => {
const message = {name: name, id: id, provider: provider, body: body}; const message = {name: name, id: id, provider: provider, body: body};
window.postMessage({direction: "from-page-script", message: message}, "*"); window.postMessage({direction: "from-page-script", message: message}, "*");
}; };
window.tinywallet.disconnect = (provider) => { window.bigwallet.disconnect = (provider) => {
const disconnectRequest = {subject: "disconnect", provider: provider}; const disconnectRequest = {subject: "disconnect", provider: provider};
window.postMessage(disconnectRequest, "*"); window.postMessage(disconnectRequest, "*");
}; };
// - MARK: Ethereum // - MARK: Ethereum
let provider = new TinyWalletEthereum(); let provider = new BigWalletEthereum();
window.tinywallet.eth = provider; window.bigwallet.eth = provider;
window.ethereum = provider; window.ethereum = provider;
window.web3 = {currentProvider: provider}; window.web3 = {currentProvider: provider};
window.metamask = provider; window.metamask = provider;
@ -30,8 +30,8 @@ window.dispatchEvent(new Event('ethereum#initialized'));
function announceProvider() { function announceProvider() {
const info = { const info = {
uuid: "bcce26fb-e330-425c-9d21-43ed52e98fcf", uuid: "08ac99d0-ec2b-4088-8599-c9f7eede344e",
name: "tiny wallet", name: "big wallet",
icon: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgdmlld0JveD0iMCAwIDI1NiAyNTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjA5Ljc1IDEyOEMyMDkuNzUgODIuODUwOCAxNzMuMTQ5IDQ2LjI1IDEyOCA0Ni4yNUM4Mi44NTA4IDQ2LjI1IDQ2LjI1IDgyLjg1MDggNDYuMjUgMTI4QzQ2LjI1IDE3My4xNDkgODIuODUwOCAyMDkuNzUgMT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G9wIG9mZnNldD0iMC4xNTYyIiBzdG9wLWNvbG9yPSIjQzZFNkY1Ii8+CjxzdG9wIG9mZnNldD0iMC4zOTU4IiBzdG9wLWNvbG9yPSIjQTNEMkYwIi8+CjxzdG9wIG9mZnNldD0iMC43MjkyIiBzdG9wLWNvbG9yPSIjNUY4QUU3Ii8+CjxzdG9wIG9mZnNldD0iMC45MDYzIiBzdG9wLWNvbG9yPSIjMUQ0OUU3Ii8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzE0MzhFQiIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo=',
rdns: "org.lil.wallet" rdns: "org.lil.wallet"
}; };
@ -45,7 +45,7 @@ announceProvider();
window.addEventListener("message", function(event) { window.addEventListener("message", function(event) {
if (event.source == window && event.data && event.data.direction == "rpc-back") { 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") { } else if (event.source == window && event.data && event.data.direction == "from-content-script") {
const response = event.data.response; const response = event.data.response;
const id = event.data.id; const id = event.data.id;
@ -72,7 +72,7 @@ window.addEventListener("message", function(event) {
function deliverResponseToSpecificProvider(id, response, providerName) { function deliverResponseToSpecificProvider(id, response, providerName) {
switch (providerName) { switch (providerName) {
case "ethereum": case "ethereum":
provider.processTinyWalletResponse(id, response); provider.processBigWalletResponse(id, response);
break; break;
case "multiple": case "multiple":
response.bodies.forEach((body) => { response.bodies.forEach((body) => {
@ -94,6 +94,6 @@ function deliverResponseToSpecificProvider(id, response, providerName) {
break; break;
default: default:
// pass unknown provider message to all providers // pass unknown provider message to all providers
provider.processTinyWalletResponse(id, response); provider.processBigWalletResponse(id, response);
} }
} }

View File

@ -9,7 +9,7 @@
}, },
"repository": { "repository": {
"type": "git", "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": [], "keywords": [],
"author": "lil org <yo@lil.org>", "author": "lil org <yo@lil.org>",

View File

@ -74,7 +74,7 @@ function injectScript() {
container.insertBefore(scriptTag, container.children[0]); container.insertBefore(scriptTag, container.children[0]);
container.removeChild(scriptTag); container.removeChild(scriptTag);
} catch (error) { } 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

View File

@ -126,7 +126,7 @@ function onBeforeExtensionPageNavigation(details) {
if (details.url.includes("lil.org/extension?query=")) { if (details.url.includes("lil.org/extension?query=")) {
const queryStringIndex = details.url.indexOf("?query=") + 7; const queryStringIndex = details.url.indexOf("?query=") + 7;
const encodedQuery = details.url.substring(queryStringIndex); 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 });
} }
} }

View File

@ -40,7 +40,7 @@ class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
} }
} else if let query = String(data: data, encoding: .utf8)?.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed), } else if let query = String(data: data, encoding: .utf8)?.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
let request = SafariRequest(query: query), 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, if case let .ethereum(ethereumRequest) = request.body,
ethereumRequest.method == .switchEthereumChain || ethereumRequest.method == .addEthereumChain { ethereumRequest.method == .switchEthereumChain || ethereumRequest.method == .addEthereumChain {
// TODO: different processing for addEthereumChain // TODO: different processing for addEthereumChain

View File

@ -15,7 +15,7 @@ class ConfigurationService {
} }
private func getInfuraKeysFromCloudKit(completion: @escaping ([String]) -> Void) { 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 publicDatabase = container.publicCloudDatabase
let predicate = NSPredicate(value: true) let predicate = NSPredicate(value: true)
let query = CKQuery(recordType: "Config", predicate: predicate) let query = CKQuery(recordType: "Config", predicate: predicate)

View File

@ -843,12 +843,12 @@
} }
} }
}, },
"tiny wallet" : { "big wallet" : {
"localizations" : { "localizations" : {
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "tiny wallet" "value" : "big wallet"
} }
} }
} }
@ -1025,4 +1025,4 @@
} }
}, },
"version" : "1.0" "version" : "1.0"
} }

View File

@ -15,11 +15,11 @@ struct Strings {
static let failedToSend = loc("Failed to send") static let failedToSend = loc("Failed to send")
static let failedToSign = loc("Failed to sign") static let failedToSign = loc("Failed to sign")
static let failedToSwitchChain = loc("Failed to switch chain") 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 showWallets = loc("Show Wallets")
static let enterWallet = loc("Enter Wallet") static let enterWallet = loc("Enter Wallet")
static let quit = loc("Quit") 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 enableSafariExtension = loc("Enable Safari Extension")
static let dropUsALine = loc("yo@lil.org") static let dropUsALine = loc("yo@lil.org")
static let viewOnGithub = loc("github") static let viewOnGithub = loc("github")