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

Add Ledger Live connector #733

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 31 additions & 0 deletions dapp/ledger-manifest-testnet-preview.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"id": "acre-testnet",
"name": "Acre [testnet - preview]",
"url": "https://deploy-preview-733--acre-dapp-testnet.netlify.app/?embed=ledger-live",
"homepageUrl": "https:/acre.fi/",
"icon": "https://deploy-preview-733--acre-dapp-testnet.netlify.app/acre.svg",
"platforms": "desktop",
"apiVersion": "^2.0.0",
"manifestVersion": "2",
"branch": "stable",
"categories": ["staking"],
"currencies": ["bitcoin", "bitcoin_testnet"],
"content": {
"shortDescription": {
"en": "Bitcoin Liquid Staking"
},
"description": {
"en": "Bitcoin Liquid Staking"
}
},
"permissions": [
"account.request",
"account.list",
"message.sign",
"transaction.sign",
"transaction.signAndBroadcast",
"bitcoin.getXPub"
],
"domains": ["http://*"],
"type": "walletApp"
}
2 changes: 1 addition & 1 deletion dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@chakra-ui/react": "^2.8.2",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@orangekit/react": "1.0.0-beta.30",
"@orangekit/react": "1.0.0-beta.32-dev.0",
"@orangekit/sign-in-with-wallet": "1.0.0-beta.6",
"@reduxjs/toolkit": "^2.2.0",
"@rehooks/local-storage": "^2.4.5",
Expand Down
4 changes: 2 additions & 2 deletions dapp/src/components/ConnectWalletModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react"
import { ModalBody, ModalHeader, ModalCloseButton } from "@chakra-ui/react"
import { useConnectors, useIsEmbed, useWalletConnectionError } from "#/hooks"
import { OrangeKitConnector, BaseModalProps, OnSuccessCallback } from "#/types"
import { wallets } from "#/constants"
// import { wallets } from "#/constants"
import withBaseModal from "../ModalRoot/withBaseModal"
import ConnectWalletButton from "./ConnectWalletButton"
import ConnectWalletErrorAlert from "./ConnectWalletErrorAlert"
Expand All @@ -17,7 +17,7 @@ export function ConnectWalletModalBase({
const connectors = useConnectors()
const enabledConnectors = connectors.map((connector) => ({
...connector,
isDisabled: !wallets.SUPPORTED_WALLET_IDS.includes(connector.id),
isDisabled: false,
}))

const [selectedConnectorId, setSelectedConnectorId] = useState<string>()
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/constants/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const XVERSE: WalletInfo = {
}

const LEDGER: WalletInfo = {
id: "orangekit-ledger",
id: "orangekit-ledger-live",
downloadUrls: {
desktop: "https://www.ledger.com/ledger-live",
},
Expand Down
5 changes: 4 additions & 1 deletion dapp/src/wagmiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
getOrangeKitUnisatConnector,
getOrangeKitOKXConnector,
getOrangeKitXverseConnector,
getOrangeKitLedgerLiveConnector,
} from "@orangekit/react"
import { env } from "./constants"
import { router } from "./utils"
Expand All @@ -27,8 +28,10 @@ const transports = chains.reduce(
const orangeKitUnisatConnector = getOrangeKitUnisatConnector(connectorConfig)
const orangeKitOKXConnector = getOrangeKitOKXConnector(connectorConfig)
const orangeKitXverseConnector = getOrangeKitXverseConnector(connectorConfig)
const orangeKitLedgerLiveConnector =
getOrangeKitLedgerLiveConnector(connectorConfig)

const embedConnectors = [orangeKitXverseConnector()]
const embedConnectors = [orangeKitLedgerLiveConnector()]
const defaultConnectors = [
orangeKitOKXConnector(),
orangeKitUnisatConnector(),
Expand Down
69 changes: 42 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading