Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: eip-6963 support #689

Merged
merged 49 commits into from
Oct 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
81aaadc
feat: bloodbath
gomesalexandre Oct 3, 2024
356cefb
feat: add todo
gomesalexandre Oct 3, 2024
1524b56
feat: more bloodbath
gomesalexandre Oct 3, 2024
590cc73
feat: and more
gomesalexandre Oct 3, 2024
e883551
[skip ci] feat: the bloodbath continues
gomesalexandre Oct 3, 2024
d48968d
feat: more cleanup
gomesalexandre Oct 3, 2024
c6e9944
feat: and more
gomesalexandre Oct 3, 2024
76ba4ad
feat: install
gomesalexandre Oct 3, 2024
42e4694
chore: trigger CI
gomesalexandre Oct 3, 2024
2b558bb
feat: install from upstream npm vs. verdaccio
gomesalexandre Oct 3, 2024
d2cb6e8
chore: trigger CI
gomesalexandre Oct 3, 2024
ba374d7
feat: yarn pls
gomesalexandre Oct 3, 2024
c94b3a2
fix: package naming was poop, tests were sad
gomesalexandre Oct 3, 2024
fbbcf70
feat: bump locally
gomesalexandre Oct 3, 2024
e5137c6
chore(release): publish 1.55.10
gomesalexandre Oct 3, 2024
2729762
feat: unnuke cache
gomesalexandre Oct 3, 2024
a9fa9f5
feat: rename class
gomesalexandre Oct 4, 2024
64ddd3b
feat: install upstream
gomesalexandre Oct 4, 2024
4fc209c
chore(release): publish 1.55.10
gomesalexandre Oct 4, 2024
53886b5
feat: add providerRdns
gomesalexandre Oct 7, 2024
530761d
fix: tests
gomesalexandre Oct 7, 2024
e93893a
fix: lint
gomesalexandre Oct 7, 2024
e4360ef
chore: trigger CI
gomesalexandre Oct 7, 2024
59c7ae2
fix: integration tests, revert ts-ignore in follow-up
gomesalexandre Oct 7, 2024
0336736
feat: ts-expect-error
gomesalexandre Oct 7, 2024
c1ca591
feat: rm cache nuke
gomesalexandre Oct 7, 2024
9aeb794
feat: install upstream
gomesalexandre Oct 7, 2024
e8d0d10
feat: cleanup
gomesalexandre Oct 7, 2024
3c524b8
feat: bring back onboarding
gomesalexandre Oct 7, 2024
c564cae
fix: yarn.lock
gomesalexandre Oct 7, 2024
df02ebb
feat: consistently describe eth path with conventional "Ethereum"
gomesalexandre Oct 7, 2024
de2247e
feat: bump sandbox packages to latest
gomesalexandre Oct 7, 2024
e0e8f4e
feat: more cleanup
gomesalexandre Oct 7, 2024
1b4ad64
feat: throw on generic rdns no provider found
gomesalexandre Oct 8, 2024
c9923c7
feat: more cleanup
gomesalexandre Oct 8, 2024
abd4383
feat: bump snap packages
gomesalexandre Oct 8, 2024
fe95c82
feat: sandbox use 1.55.10 for hdwallet-metamask-multichain
gomesalexandre Oct 8, 2024
841de8c
feat: bring back hdwallet-coinbase
gomesalexandre Oct 9, 2024
93ca994
fix: ci
gomesalexandre Oct 9, 2024
b66188a
fix: regen yarn.lock
gomesalexandre Oct 9, 2024
6882c64
chore: trigger CI
gomesalexandre Oct 9, 2024
644b281
chore: trigger CI (maybe? pls?)
gomesalexandre Oct 9, 2024
efa6d0d
Merge remote-tracking branch 'origin/master' into mipd
gomesalexandre Oct 9, 2024
05e6692
chore(release): publish 1.55.11
gomesalexandre Oct 9, 2024
c36c984
chore: trigger CI (maybe? pls? ser?)
gomesalexandre Oct 9, 2024
561ce08
attempt fix ci build
kaladinlight Oct 9, 2024
15ba92a
fix test
kaladinlight Oct 9, 2024
85f8039
fix: use providerRdns as deviceId
gomesalexandre Oct 15, 2024
d6b6c96
fix: correct deviceId
gomesalexandre Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions packages/hdwallet-metamask-multichain/src/adapter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import MetaMaskOnboarding from "@metamask/onboarding";
import * as core from "@shapeshiftoss/hdwallet-core";
import { enableShapeShiftSnap, shapeShiftSnapInstalled } from "@shapeshiftoss/metamask-snaps-adapter";
import { createStore } from "mipd";

import { SNAP_ID } from "./common";
import { MetaMaskMultiChainHDWallet } from "./shapeshift-multichain";

export const mipdstore = createStore();
Expand Down Expand Up @@ -41,17 +39,6 @@ export class MetaMaskAdapter {
if (!maybeEip6963Provider) throw new Error("EIP-6963 provider not found");
kaladinlight marked this conversation as resolved.
Show resolved Hide resolved
const eip1193Provider = maybeEip6963Provider.provider;

// Checks if the EIP-6963 provider is *akschual* MetaMask
// This assumes that the wallet supports EIP-6963, which all major wallets do
const isMetaMask = maybeEip6963Provider.info.rdns === "io.metamask";

if (isMetaMask && !shapeShiftSnapInstalled(SNAP_ID)) {
console.info("ShapeShift Multichain snap not found. Prompting user to install.");
const result = await enableShapeShiftSnap(SNAP_ID);
if (result.success === false) {
throw new Error("Could not install ShapeShift Multichain snap");
}
}
kaladinlight marked this conversation as resolved.
Show resolved Hide resolved
try {
await eip1193Provider.request?.({ method: "eth_requestAccounts" }).catch(() =>
eip1193Provider.request?.({
Expand Down