@farcaster/miniapp-sdk 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ethereumProvider.js
CHANGED
|
@@ -20,10 +20,9 @@ function toProviderRpcError({ code, details, }) {
|
|
|
20
20
|
return new Provider.ProviderRpcError(code, details ?? 'Unknown provider RPC error');
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
const providerConfig = {
|
|
24
24
|
...emitter,
|
|
25
25
|
async request(args) {
|
|
26
|
-
// @ts-expect-error
|
|
27
26
|
const request = store.prepare(args);
|
|
28
27
|
try {
|
|
29
28
|
const response = await miniAppHost
|
|
@@ -49,7 +48,8 @@ export const ethereumProvider = Provider.from({
|
|
|
49
48
|
});
|
|
50
49
|
}
|
|
51
50
|
},
|
|
52
|
-
}
|
|
51
|
+
};
|
|
52
|
+
export const ethereumProvider = Provider.from(providerConfig);
|
|
53
53
|
export async function getEthereumProvider() {
|
|
54
54
|
try {
|
|
55
55
|
const capabilities = await miniAppHost.getCapabilities();
|