Skip to content

Commit

Permalink
🔌 Update Provider interface for EIP6963
Browse files Browse the repository at this point in the history
  • Loading branch information
KimlikDAO-bot committed Feb 14, 2025
1 parent 8d84ebc commit 1698df6
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
9 changes: 7 additions & 2 deletions crosschain/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ function Provider() { }
/**
* @return {boolean}
*/
Provider.prototype.initIfAvailable = function () { }
Provider.prototype.isInitialized = function () { }

/**
* @param {*} nativeProvider
*/
Provider.prototype.setNativeProvider = function (nativeProvider) { }

/**
* @return {string}
Expand Down Expand Up @@ -47,6 +52,6 @@ Provider.prototype.isChainSupported = function (chain) { }
/**
* @type {?}
*/
Provider.prototype.provider;
Provider.prototype.nativeProvider;

export { Provider };
18 changes: 18 additions & 0 deletions ethereum/provider.d.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,21 @@ eth.WatchAssetParam.prototype.options;
* }}
*/
eth.ProviderRpcError = {};

/**
* @typedef {{
* uuid: string,
* name: string,
* icon: string,
* rdns: string
* }}
*/
eth.ProviderInfo = {};

/**
* @typedef {{
* provider: !eth.UiProvider,
* info: eth.ProviderInfo,
* }}
*/
eth.ProviderDetail = {};
4 changes: 3 additions & 1 deletion kastro/kastro.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ const setupKastro = () => {
ethereum: {
isRabby: false
},
}
addEventListener(name, handler) { },
dispatchEvent(event) { }
};
globalThis.GEN = true;
globalThis.window = window;
globalThis.document = {
Expand Down
4 changes: 2 additions & 2 deletions util/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const adlaGöster = (ad) => adla(ad).style.display = "";
* @param {string} ad
* @param {boolean} göster
*/
const adlaGösterGizle = (ad, göster) => gösterGizle(adla(ad), göster);
const toggleById = (ad, göster) => gösterGizle(adla(ad), göster);

/**
* @param {!HTMLAnchorElement} düğme Durdurulacak düğme.
Expand Down Expand Up @@ -262,7 +262,7 @@ export default {
adla,
adlaGizle,
adlaGöster,
adlaGösterGizle,
toggleById,
gizle,
göster,
gösterGizle,
Expand Down

0 comments on commit 1698df6

Please sign in to comment.