mirror of
https://github.com/andrei0x309/clear-wallet.git
synced 2025-01-10 12:30:46 +00:00
Compare commits
No commits in common. "2638ea94f45c89035c6c34aac05165ff42ba219f" and "a4d99f04fde6b9cb4fff6b5fdcd20feab9f6da68" have entirely different histories.
2638ea94f4
...
a4d99f04fd
@ -1,10 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## Manifest Version 1.2.8
|
|
||||||
|
|
||||||
- better support for estimate gas
|
|
||||||
- added support for deprecated .send method to support more websites
|
|
||||||
|
|
||||||
## Manifest Version 1.2.7
|
## Manifest Version 1.2.7
|
||||||
|
|
||||||
- improve compatibility with ionic 7
|
- improve compatibility with ionic 7
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "clear-wallet",
|
"name": "clear-wallet",
|
||||||
"version": "1.2.8",
|
"version": "1.2.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
@ -121,16 +121,7 @@ class MetaMaskAPI {
|
|||||||
// Deprecated
|
// Deprecated
|
||||||
send (arg1: unknown, arg2: unknown): unknown {
|
send (arg1: unknown, arg2: unknown): unknown {
|
||||||
if (arg2 === undefined) {
|
if (arg2 === undefined) {
|
||||||
if( typeof arg1 === 'string' ) {
|
console.error('Clear Wallet: Sync calling is deprecated and not supported')
|
||||||
return sendMessage({
|
|
||||||
method: arg1,
|
|
||||||
params: undefined
|
|
||||||
})
|
|
||||||
} else if (typeof arg1 === 'object') {
|
|
||||||
return sendMessage(arg1 as RequestArguments)
|
|
||||||
} else {
|
|
||||||
console.error('Clear Wallet: faulty request')
|
|
||||||
}
|
|
||||||
}else if( typeof arg1 === 'string' ) {
|
}else if( typeof arg1 === 'string' ) {
|
||||||
return sendMessage({
|
return sendMessage({
|
||||||
method: arg1,
|
method: arg1,
|
||||||
@ -302,7 +293,7 @@ const listner = function(event: any) {
|
|||||||
try {
|
try {
|
||||||
if(event?.data?.data?.error){
|
if(event?.data?.data?.error){
|
||||||
promResolvers.get(event.data.resId)?.reject(event.data.data);
|
promResolvers.get(event.data.resId)?.reject(event.data.data);
|
||||||
console.error(event?.data?.data)
|
// console.error(event?.data?.data)
|
||||||
}else {
|
}else {
|
||||||
promResolvers.get(event.data.resId)?.resolve(event.data.data);
|
promResolvers.get(event.data.resId)?.resolve(event.data.data);
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
"name": "__MSG_appName__",
|
"name": "__MSG_appName__",
|
||||||
"description": "__MSG_appDesc__",
|
"description": "__MSG_appDesc__",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"version": "1.2.8",
|
"version": "1.2.7",
|
||||||
"version_name": "1.2.8",
|
"version_name": "1.2.7",
|
||||||
"icons": {
|
"icons": {
|
||||||
"16": "assets/extension-icon/wallet_16.png",
|
"16": "assets/extension-icon/wallet_16.png",
|
||||||
"32": "assets/extension-icon/wallet_32.png",
|
"32": "assets/extension-icon/wallet_32.png",
|
||||||
|
@ -211,14 +211,12 @@ const mainListner = (message: RequestArguments, sender:any, sendResponse: (a: an
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
const gas = await estimateGas({
|
sendResponse(await estimateGas({
|
||||||
to: params?.to ?? '',
|
to: params?.to ?? '',
|
||||||
from: params?.from ?? '',
|
from: params?.from ?? '',
|
||||||
data: params?.data ?? '',
|
data: params?.data ?? '',
|
||||||
value: params?.value ?? '0x0'
|
value: params?.value ?? '0x0'
|
||||||
})
|
}))
|
||||||
const gasHex = gas?._hex ? gas?._hex : gas
|
|
||||||
sendResponse(gasHex)
|
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
if(String(err).includes('UNPREDICTABLE_GAS_LIMIT')) {
|
if(String(err).includes('UNPREDICTABLE_GAS_LIMIT')) {
|
||||||
chrome.notifications.create({
|
chrome.notifications.create({
|
||||||
|
Loading…
Reference in New Issue
Block a user