diff --git a/packages/yoroi-extension/app/UI/features/governace/common/ChooseDRepModal.tsx b/packages/yoroi-extension/app/UI/features/governace/common/ChooseDRepModal.tsx index 8b1943c8bb..7f305610a6 100644 --- a/packages/yoroi-extension/app/UI/features/governace/common/ChooseDRepModal.tsx +++ b/packages/yoroi-extension/app/UI/features/governace/common/ChooseDRepModal.tsx @@ -1,16 +1,15 @@ import { LoadingButton } from '@mui/lab'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; -import { parseDrepId } from '@yoroi/staking'; import * as React from 'react'; -import { RustModule } from '../../../../api/ada/lib/cardanoCrypto/rustLoader'; +import { dRepToMaybeCredentialHex } from '../../../../api/ada/lib/cardanoCrypto/utils'; import { TextInput } from '../../../components/Input/TextInput'; import { useModal } from '../../../components/modals/ModalContext'; import { useGovernance } from '../module/GovernanceContextProvider'; import { useStrings } from './useStrings'; type ChooseDRepModallProps = { - onSubmit?: (drepId: string) => void; + onSubmit?: (drepId: string, drepCredential: string) => void; }; export const ChooseDRepModal = ({ onSubmit }: ChooseDRepModallProps) => { @@ -25,13 +24,12 @@ export const ChooseDRepModal = ({ onSubmit }: ChooseDRepModallProps) => { }, [drepId]); const confirmDRep = () => { - parseDrepId(drepId, RustModule.CrossCsl.init('any')) - .then(_ => { - onSubmit?.(drepId); - }) - .catch(_ => { - setError(true); - }); + const dRepCredentialHex: string | null = dRepToMaybeCredentialHex(drepId); + if (dRepCredentialHex == null) { + setError(true); + } else { + onSubmit?.(drepId, dRepCredentialHex); + } }; return ( diff --git a/packages/yoroi-extension/app/UI/features/governace/common/helpers.ts b/packages/yoroi-extension/app/UI/features/governace/common/helpers.ts index 4a5600fcbe..30c3ec2332 100644 --- a/packages/yoroi-extension/app/UI/features/governace/common/helpers.ts +++ b/packages/yoroi-extension/app/UI/features/governace/common/helpers.ts @@ -1,7 +1,6 @@ import BigNumber from 'bignumber.js'; import moment from 'moment'; import { WalletTypeOption } from '../../../../api/ada/lib/storage/models/ConceptualWallet/interfaces'; -import { maybe } from '../../../../coreUtils'; import { genLookupOrFail } from '../../../../stores/stateless/tokenHelpers'; import { calculateAndFormatValue } from '../../../../utils/unit-of-account'; @@ -89,7 +88,9 @@ export const getFormattedPairingValue = (getCurrentPrice, defaultTokenInfo, unit }; const getTotalAmount = (walletAmount, rewards) => { - return maybe(walletAmount, w => rewards.joinAddCopy(w)); + return walletAmount && rewards + ? walletAmount.joinAddCopy(rewards) + : (walletAmount ?? rewards); }; const getWalletTotalAdaBalance = (stores, selectedWallet) => { @@ -97,6 +98,7 @@ const getWalletTotalAdaBalance = (stores, selectedWallet) => { const rewards = stores.delegation.getRewardBalanceOrZero(selectedWallet); const amount = getTotalAmount(totalAmount, rewards); const defaultEntry = amount?.getDefaultEntry(); + if (defaultEntry == null) return new BigNumber(0); const getTokenInfo = genLookupOrFail(stores.tokenInfoStore.tokenInfo); const tokenInfo = getTokenInfo(defaultEntry); return defaultEntry.amount.shiftedBy(-tokenInfo.Metadata.numberOfDecimals); diff --git a/packages/yoroi-extension/app/UI/features/governace/common/useStrings.tsx b/packages/yoroi-extension/app/UI/features/governace/common/useStrings.tsx index 521c6c72cf..8e39c9abd5 100644 --- a/packages/yoroi-extension/app/UI/features/governace/common/useStrings.tsx +++ b/packages/yoroi-extension/app/UI/features/governace/common/useStrings.tsx @@ -39,7 +39,7 @@ export const messages = Object.freeze( }, drepId: { id: 'governance.drepId', - defaultMessage: '!!!Drep ID:', + defaultMessage: '!!!Drep ID (Fingerprint):', }, delegateToDRep: { id: 'governance.delegateToDRep', diff --git a/packages/yoroi-extension/app/UI/features/governace/useCases/SelectGovernanceStatus/GovernanceStatusSelection.tsx b/packages/yoroi-extension/app/UI/features/governace/useCases/SelectGovernanceStatus/GovernanceStatusSelection.tsx index 936563ee64..8c595b840f 100644 --- a/packages/yoroi-extension/app/UI/features/governace/useCases/SelectGovernanceStatus/GovernanceStatusSelection.tsx +++ b/packages/yoroi-extension/app/UI/features/governace/useCases/SelectGovernanceStatus/GovernanceStatusSelection.tsx @@ -54,7 +54,7 @@ export const GovernanceStatusSelection = () => { const pageSubtitle = governanceStatus.status === 'none' ? strings.reviewSelection : strings.statusSelected(statusRawText); const isPendindDrepDelegationTx = submitedTransactions.length > 0 && submitedTransactions[0]?.isDrepDelegation === true; - const openDRepIdModal = (onSubmit: (drepID: string) => void) => { + const openDRepIdModal = (onSubmit: (drepID: string, drepCredential: string) => void) => { if (!governanceManager) { return; } @@ -72,10 +72,10 @@ export const GovernanceStatusSelection = () => { }; const handleDelegate = async () => { - openDRepIdModal(drepID => { + openDRepIdModal((drepID, drepCredential) => { const vote: Vote = { kind: 'delegate', drepID }; governanceVoteChanged(vote); - createUnsignTx(drepID); + createUnsignTx(drepCredential); }); }; diff --git a/packages/yoroi-extension/app/api/ada/lib/cardanoCrypto/utils.js b/packages/yoroi-extension/app/api/ada/lib/cardanoCrypto/utils.js index 25a2a66380..bd792da86c 100644 --- a/packages/yoroi-extension/app/api/ada/lib/cardanoCrypto/utils.js +++ b/packages/yoroi-extension/app/api/ada/lib/cardanoCrypto/utils.js @@ -37,6 +37,22 @@ export function transactionHexReplaceWitnessSet(txHex: string, witnessSetHex: st }); } +export function dRepToMaybeCredentialHex(s: string): ?string { + return RustModule.WasmScope(Module => { + try { + if (s.startsWith('drep1')) { + return Module.WalletV4.Credential + .from_keyhash(Module.WalletV4.Ed25519KeyHash.from_bech32(s)).to_hex(); + } + if (s.startsWith('drep_script1')) { + return Module.WalletV4.Credential + .from_scripthash(Module.WalletV4.ScriptHash.from_bech32(s)).to_hex(); + } + } catch {} // eslint-disable-line no-empty + return null; + }) +} + export function pubKeyHashToRewardAddress(hex: string, network: number): string { return RustModule.WasmScope(Module => Module.WalletV4.RewardAddress.new( diff --git a/packages/yoroi-extension/app/api/ada/lib/storage/bridge/delegationUtils.js b/packages/yoroi-extension/app/api/ada/lib/storage/bridge/delegationUtils.js index a54ceb0119..0f499345eb 100644 --- a/packages/yoroi-extension/app/api/ada/lib/storage/bridge/delegationUtils.js +++ b/packages/yoroi-extension/app/api/ada/lib/storage/bridge/delegationUtils.js @@ -8,7 +8,6 @@ import { normalizeToAddress, unwrapStakingKey, } from './utils'; import type { IGetAllUtxosResponse, IGetStakingKey, } from '../models/PublicDeriver/interfaces'; import { MultiToken, } from '../../../../common/lib/MultiToken'; import { maybe, fail } from '../../../../../coreUtils'; -import { isHex } from '@emurgo/yoroi-lib/dist/internals/utils/index'; export type GetDelegatedBalanceRequest = {| publicDeriver: PublicDeriver<> & IGetStakingKey, @@ -139,23 +138,20 @@ export async function getUtxoDelegatedBalance( export const DREP_ALWAYS_ABSTAIN = 'ALWAYS_ABSTAIN'; export const DREP_ALWAYS_NO_CONFIDENCE = 'ALWAYS_NO_CONFIDENCE'; -// -function parseKey(key: string): RustModule.WalletV4.Ed25519KeyHash { - return isHex(key) - ? RustModule.WalletV4.Ed25519KeyHash.from_hex(key) - : RustModule.WalletV4.Ed25519KeyHash.from_bech32(key); -} - // function parseDrep(drepCredential: string): RustModule.WalletV4.DRep { - const DRep = RustModule.WalletV4.DRep; - if (drepCredential === DREP_ALWAYS_ABSTAIN) return DRep.new_always_abstain(); - if (drepCredential === DREP_ALWAYS_NO_CONFIDENCE) return DRep.new_always_no_confidence(); - // to handle script hashes - const credential = RustModule.WalletV4.Credential.from_keyhash(parseKey(drepCredential)); - return maybe(credential.to_keyhash(), k => DRep.new_key_hash(k)) - ?? maybe(credential.to_scripthash(), s => DRep.new_script_hash(s)) - ?? fail('weird credential cannot be converted into a drep: ' + credential.to_hex()) + try { + const DRep = RustModule.WalletV4.DRep; + if (drepCredential === DREP_ALWAYS_ABSTAIN) return DRep.new_always_abstain(); + if (drepCredential === DREP_ALWAYS_NO_CONFIDENCE) return DRep.new_always_no_confidence(); + const credential = RustModule.WalletV4.Credential.from_hex(drepCredential); + return maybe(credential.to_keyhash(), k => DRep.new_key_hash(k)) + ?? maybe(credential.to_scripthash(), s => DRep.new_script_hash(s)) + ?? fail('weird credential cannot be converted into a drep: ' + credential.to_hex()) + } catch (e) { + console.log('Fail to parse a drep credential: ' + drepCredential, e); + throw e; + } } // diff --git a/packages/yoroi-extension/app/api/ada/lib/storage/bridge/updateTransactions.js b/packages/yoroi-extension/app/api/ada/lib/storage/bridge/updateTransactions.js index 11ebc8778b..5edfaef7ed 100644 --- a/packages/yoroi-extension/app/api/ada/lib/storage/bridge/updateTransactions.js +++ b/packages/yoroi-extension/app/api/ada/lib/storage/bridge/updateTransactions.js @@ -3054,7 +3054,7 @@ async function certificateToDb( result.push((txId: number) => ({ certificate: { Ordinal: cert.certIndex, - Kind: RustModule.WalletV4.CertificateKind.DrepRegistration, + Kind: RustModule.WalletV4.CertificateKind.DRepRegistration, Payload: '', TransactionId: txId, }, @@ -3066,7 +3066,7 @@ async function certificateToDb( result.push((txId: number) => ({ certificate: { Ordinal: cert.certIndex, - Kind: RustModule.WalletV4.CertificateKind.DrepDeregistration, + Kind: RustModule.WalletV4.CertificateKind.DRepDeregistration, Payload: '', TransactionId: txId, }, @@ -3078,7 +3078,7 @@ async function certificateToDb( result.push((txId: number) => ({ certificate: { Ordinal: cert.certIndex, - Kind: RustModule.WalletV4.CertificateKind.DrepUpdate, + Kind: RustModule.WalletV4.CertificateKind.DRepUpdate, Payload: '', TransactionId: txId, }, diff --git a/packages/yoroi-extension/app/api/ada/transactions/shelley/ledgerTx.js b/packages/yoroi-extension/app/api/ada/transactions/shelley/ledgerTx.js index cb31f7a1f1..ba15ac5979 100644 --- a/packages/yoroi-extension/app/api/ada/transactions/shelley/ledgerTx.js +++ b/packages/yoroi-extension/app/api/ada/transactions/shelley/ledgerTx.js @@ -343,8 +343,8 @@ function formatLedgerWithdrawals( } type WasmCertWithAnchor = - RustModule.WalletV4.DrepRegistration - | RustModule.WalletV4.DrepUpdate; + RustModule.WalletV4.DRepRegistration + | RustModule.WalletV4.DRepUpdate; function wasmCertToAnchor(wasmCert: WasmCertWithAnchor): ?AnchorParams { const wasmAnchor = wasmCert.anchor(); @@ -372,9 +372,9 @@ function wasmCertToStakeCredential(wasmCert: WasmCertWithStakeCredential, getPat } type WasmCertWithDrepCredential = - RustModule.WalletV4.DrepRegistration - | RustModule.WalletV4.DrepUpdate - | RustModule.WalletV4.DrepDeregistration; + RustModule.WalletV4.DRepRegistration + | RustModule.WalletV4.DRepUpdate + | RustModule.WalletV4.DRepDeregistration; function wasmCertToDRepCredential(wasmCert: WasmCertWithDrepCredential, getPath: RustModule.WalletV4.Credential => number[]): CredentialParams { return { @@ -521,7 +521,7 @@ function convertCertificate( wasmCertToVoteDelegation(wasmCert, getPath), ]; } - case RustModule.WalletV4.CertificateKind.DrepRegistration: { + case RustModule.WalletV4.CertificateKind.DRepRegistration: { const wasmCert = forceNonNull(wasmCertificateWrap.as_drep_registration()); return [{ type: CertificateType.DREP_REGISTRATION, @@ -532,7 +532,7 @@ function convertCertificate( }, }]; } - case RustModule.WalletV4.CertificateKind.DrepUpdate: { + case RustModule.WalletV4.CertificateKind.DRepUpdate: { const wasmCert = forceNonNull(wasmCertificateWrap.as_drep_update()); return [{ type: CertificateType.DREP_UPDATE, @@ -542,7 +542,7 @@ function convertCertificate( }, }]; } - case RustModule.WalletV4.CertificateKind.DrepDeregistration: { + case RustModule.WalletV4.CertificateKind.DRepDeregistration: { const wasmCert = forceNonNull(wasmCertificateWrap.as_drep_deregistration()); return [{ type: CertificateType.DREP_DEREGISTRATION, diff --git a/packages/yoroi-extension/app/components/wallet/transactions/TransactionRevamp.js b/packages/yoroi-extension/app/components/wallet/transactions/TransactionRevamp.js index 4a38bf5c25..3f2a491eed 100644 --- a/packages/yoroi-extension/app/components/wallet/transactions/TransactionRevamp.js +++ b/packages/yoroi-extension/app/components/wallet/transactions/TransactionRevamp.js @@ -900,11 +900,11 @@ export default class TransactionRevamp extends Component { return intl.formatMessage(shelleyCertificateKinds.CommitteeHotAuth); case Scope.WalletV4.CertificateKind.CommitteeColdResign: return intl.formatMessage(shelleyCertificateKinds.CommitteeColdResign); - case Scope.WalletV4.CertificateKind.DrepRegistration: + case Scope.WalletV4.CertificateKind.DRepRegistration: return intl.formatMessage(shelleyCertificateKinds.DrepRegistration); - case Scope.WalletV4.CertificateKind.DrepDeregistration: + case Scope.WalletV4.CertificateKind.DRepDeregistration: return intl.formatMessage(shelleyCertificateKinds.DrepDeregistration); - case Scope.WalletV4.CertificateKind.DrepUpdate: + case Scope.WalletV4.CertificateKind.DRepUpdate: return intl.formatMessage(shelleyCertificateKinds.DrepUpdate); default: { throw new Error(`${nameof(this.shelleyCertificateToText)} unexpected kind ${kind}`); diff --git a/packages/yoroi-extension/app/connector/stores/ConnectorStore.js b/packages/yoroi-extension/app/connector/stores/ConnectorStore.js index 1c6601e287..e3657606ad 100644 --- a/packages/yoroi-extension/app/connector/stores/ConnectorStore.js +++ b/packages/yoroi-extension/app/connector/stores/ConnectorStore.js @@ -852,11 +852,11 @@ export default class ConnectorStore extends Store { cip95Info.push({ type: 'VotingProcedure', voterType: voter.kind(), - voterHash: voter.to_constitutional_committee_hot_cred()?.to_scripthash()?.to_hex() || - voter.to_constitutional_committee_hot_cred()?.to_keyhash()?.to_hex() || - voter.to_drep_cred()?.to_scripthash()?.to_hex() || - voter.to_drep_cred()?.to_keyhash()?.to_hex() || - voter.to_staking_pool_key_hash()?.to_hex() || + voterHash: voter.to_constitutional_committee_hot_credential()?.to_scripthash()?.to_hex() || + voter.to_constitutional_committee_hot_credential()?.to_keyhash()?.to_hex() || + voter.to_drep_credential()?.to_scripthash()?.to_hex() || + voter.to_drep_credential()?.to_keyhash()?.to_hex() || + voter.to_stake_pool_key_hash()?.to_hex() || (() => { throw new Error('unexpected voter'); })(), govActionTxId: govActionId.transaction_id().to_hex(), govActionIndex: govActionId.index(), diff --git a/packages/yoroi-extension/app/i18n/locales/en-US.json b/packages/yoroi-extension/app/i18n/locales/en-US.json index 201a9fa9cd..dbd9f29c7d 100644 --- a/packages/yoroi-extension/app/i18n/locales/en-US.json +++ b/packages/yoroi-extension/app/i18n/locales/en-US.json @@ -1070,7 +1070,7 @@ "governance.noConfidenceInfo": "You are expressing a lack of trust for all proposals now and in the future.", "governance.learnMore": "Learn more About Governance", "governance.becomeADrep": "Want to became a Drep?", - "governance.drepId": "Drep ID:", + "governance.drepId": "Drep ID (Fingerprint):", "governance.statusSelected": "You have selected {status} as your governance status. You can change it at any time by clicking in the card bellow", "governance.statusPending": "You have chosen your governance status, this process may take a while.", "governance.registerGovernance": "Register in Governance", diff --git a/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js b/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js index fe1f12963a..8b88a5bd9f 100644 --- a/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js +++ b/packages/yoroi-extension/app/stores/stateless/sidebarCategories.js @@ -20,6 +20,7 @@ import { ReactComponent as goBackIcon } from '../../assets/images/top-bar/back-a import environment from '../../environment'; import globalMessages, { connectorMessages } from '../../i18n/global-messages'; import { ROUTES } from '../../routes-config'; +import { isTrezorTWallet } from '../../api/ada/lib/storage/models/ConceptualWallet'; export type SidebarCategory = {| +className: string, @@ -182,7 +183,7 @@ export const allCategoriesRevamp: Array = [ route: '/governance', icon: governanceIcon, label: globalMessages.sidebarGovernance, - isVisible: _request => true, + isVisible: ({ selected }) => selected != null && !isTrezorTWallet(selected.getParent()), featureFlagName: 'governance', }, { diff --git a/packages/yoroi-extension/app/stores/toplevel/DelegationStore.js b/packages/yoroi-extension/app/stores/toplevel/DelegationStore.js index 0d9d00b738..7c1e69bd3d 100644 --- a/packages/yoroi-extension/app/stores/toplevel/DelegationStore.js +++ b/packages/yoroi-extension/app/stores/toplevel/DelegationStore.js @@ -250,7 +250,9 @@ export default class DelegationStore extends Store { try { const { BackendService } = publicDeriver.getParent().getNetworkInfo().Backend; const transitionResult = await maybe(currentPool, p => - new PoolInfoApi(forceNonNull(BackendService) + '/api').getTransition(p, RustModule.CrossCsl.init) + new PoolInfoApi(forceNonNull(BackendService) + '/api') + // $FlowIgnore + .getTransition(p, RustModule.CrossCsl.init) ); const response = { @@ -319,6 +321,7 @@ export default class DelegationStore extends Store { oldBackendUrl: String(backendService), newBackendUrl: String(backendServiceZero), networkId, + // $FlowIgnore wasmFactory: RustModule.CrossCsl.init, }); diff --git a/packages/yoroi-extension/chrome/extension/connector/api.js b/packages/yoroi-extension/chrome/extension/connector/api.js index 720ec03321..176a354650 100644 --- a/packages/yoroi-extension/chrome/extension/connector/api.js +++ b/packages/yoroi-extension/chrome/extension/connector/api.js @@ -581,15 +581,15 @@ const CERT_TO_KEYHASH_FUNCS = [ ([ cert => cert.as_drep_registration(), cert => cert.voting_credential().to_keyhash(), - ]: CertToKeyhashFuncs), + ]: CertToKeyhashFuncs), ([ cert => cert.as_drep_deregistration(), cert => cert.voting_credential().to_keyhash(), - ]: CertToKeyhashFuncs), + ]: CertToKeyhashFuncs), ([ cert => cert.as_drep_update(), cert => cert.voting_credential().to_keyhash(), - ]: CertToKeyhashFuncs), + ]: CertToKeyhashFuncs), ([ cert => cert.as_pool_registration(), cert => { @@ -640,7 +640,7 @@ function getCertificatesRequiredSignKeys( if (!voter) { throw new Error('unexpectedly missing voter'); } - const keyHash = voter.to_drep_cred()?.to_keyhash(); + const keyHash = voter.to_drep_credential()?.to_keyhash(); if (keyHash) { result.add(keyHash.to_hex()); } diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index bb8abe2c67..06a303b221 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "yoroi", - "version": "5.3.0", + "version": "5.3.001", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yoroi", - "version": "5.3.0", + "version": "5.3.001", "license": "MIT", "dependencies": { "@amplitude/analytics-browser": "^2.1.3", @@ -15,12 +15,12 @@ "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", "@emurgo/cardano-message-signing-browser": "1.0.1", - "@emurgo/cardano-serialization-lib-browser": "12.0.0-alpha.26", + "@emurgo/cardano-serialization-lib-browser": "12.0.1", "@emurgo/cip14-js": "2.0.0", "@emurgo/cip4-js": "1.0.5", - "@emurgo/cross-csl-browser": "4.4.0", + "@emurgo/cross-csl-browser": "5.0.1", "@emurgo/yoroi-eutxo-txs": "0.0.2-alpha.8", - "@emurgo/yoroi-lib": "1.1.0-beta.1", + "@emurgo/yoroi-lib": "1.2.0", "@ledgerhq/hw-transport-u2f": "5.36.0-deprecated", "@ledgerhq/hw-transport-webauthn": "5.36.0-deprecated", "@ledgerhq/hw-transport-webhid": "5.51.1", @@ -112,8 +112,8 @@ "@babel/runtime": "7.12.18", "@babel/runtime-corejs3": "7.12.18", "@emurgo/cardano-message-signing-nodejs": "1.0.1", - "@emurgo/cardano-serialization-lib-nodejs": "12.0.0-alpha.26", - "@emurgo/cross-csl-nodejs": "4.4.0", + "@emurgo/cardano-serialization-lib-nodejs": "12.0.1", + "@emurgo/cross-csl-nodejs": "5.0.1", "@pmmmwh/react-refresh-webpack-plugin": "0.5.11", "@types/chrome": "^0.0.268", "@types/react-intl": "^3.0.0", @@ -2435,14 +2435,14 @@ "dev": true }, "node_modules/@emurgo/cardano-serialization-lib-browser": { - "version": "12.0.0-alpha.26", - "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-browser/-/cardano-serialization-lib-browser-12.0.0-alpha.26.tgz", - "integrity": "sha512-zP3DxaPHuJY0mOFX+3uYcu0F/ItEmgfoMJIWiT/86DeRlg7D3YLD+TxB8yvrGgADxtNKe2jJ7Y1Twrpd09GKNw==" + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-browser/-/cardano-serialization-lib-browser-12.0.1.tgz", + "integrity": "sha512-3Hoi7pzGyTAjtd7CXmUiUG9i+TOv8QMlSU/KgTwPeZkUFfdNT9syt572FCaM4fBeagiR3LRhQeNE5TMUo07VBA==" }, "node_modules/@emurgo/cardano-serialization-lib-nodejs": { - "version": "12.0.0-alpha.26", - "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs/-/cardano-serialization-lib-nodejs-12.0.0-alpha.26.tgz", - "integrity": "sha512-QheEm7wVZ4Tc0gOIYMUyf2VUb8a1ZjnDy4zNcGSRmuO1zlbJfjLDGv+uXG+pKqZN4fzMAzOtUwolTtbxzTzYbA==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs/-/cardano-serialization-lib-nodejs-12.0.1.tgz", + "integrity": "sha512-QWvMgBHgoSAGbfAtKIeNV1wpRBzivbboeUjF8cBOGl/TS9OSYmLEVhNacbPoFqT1iqMhVRlAYoyXXTW/RmNC0w==", "dev": true }, "node_modules/@emurgo/cip14-js": { @@ -2509,12 +2509,95 @@ "integrity": "sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ==" }, "node_modules/@emurgo/cross-csl-browser": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-browser/-/cross-csl-browser-4.4.0.tgz", - "integrity": "sha512-BVtrK9sOjSEuSLl7Xb8tvKf/IdTowAmi0FN2O2Juvzg7WEhsEQY3bUoiZY7eVETOLLBHjl0kDfaRDQOUc3ow9g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-browser/-/cross-csl-browser-5.0.1.tgz", + "integrity": "sha512-ASuqEVbrOsjOhDkk99GCR+ymrCiUjGAgHCx2Kvsk8aGyHeG38exRXzAxssJiq5TvZjxjJRfBe8Ors3ikrWtIQA==", + "dependencies": { + "@emurgo/cardano-serialization-lib-browser": "12.0.1", + "@emurgo/cross-csl-core": "5.0.1" + } + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/@cardano-foundation/ledgerjs-hw-app-cardano": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@cardano-foundation/ledgerjs-hw-app-cardano/-/ledgerjs-hw-app-cardano-5.1.0.tgz", + "integrity": "sha512-ucuz/XbS/0ZD0Bal/GI/kiTm9jDIl8J+A7ypEqcAcBDGicFsyWmtPotOTwuDovTsiM8+eA/5OGTFX0oRqzxstQ==", + "dependencies": { + "@ledgerhq/hw-transport": "^5.12.0", + "@types/ledgerhq__hw-transport": "^4.21.3", + "base-x": "^3.0.5", + "bech32": "^1.1.4", + "blake2": "^4.0.2", + "int64-buffer": "^1.0.1" + } + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/@cardano-foundation/ledgerjs-hw-app-cardano/node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/@emurgo/cross-csl-core": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-core/-/cross-csl-core-5.0.1.tgz", + "integrity": "sha512-PlNsW3GjqlJ7mTrHqY+M6mGkLnWh++6PAok1rdJwUP7bYS24PE2Fm4JeO1uK0dtv9mbpVLlXyjybH+HSRV7a0Q==", + "dependencies": { + "@cardano-foundation/ledgerjs-hw-app-cardano": "^5.0.0", + "@types/mocha": "^9.1.1", + "axios": "^0.24.0", + "bech32": "^2.0.0", + "bignumber.js": "^9.0.1", + "blake2b": "^2.1.4", + "hash-wasm": "^4.9.0", + "mocha": "^10.0.0" + } + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/@ledgerhq/devices": { + "version": "5.51.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.51.1.tgz", + "integrity": "sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==", "dependencies": { - "@emurgo/cardano-serialization-lib-browser": "12.0.0-alpha.26", - "@emurgo/cross-csl-core": "4.4.0" + "@ledgerhq/errors": "^5.50.0", + "@ledgerhq/logs": "^5.50.0", + "rxjs": "6", + "semver": "^7.3.5" + } + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/@ledgerhq/errors": { + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.50.0.tgz", + "integrity": "sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==" + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/@ledgerhq/hw-transport": { + "version": "5.51.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz", + "integrity": "sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==", + "dependencies": { + "@ledgerhq/devices": "^5.51.1", + "@ledgerhq/errors": "^5.50.0", + "events": "^3.3.0" + } + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/@ledgerhq/logs": { + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.50.0.tgz", + "integrity": "sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==" + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/axios": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "dependencies": { + "follow-redirects": "^1.14.4" + } + }, + "node_modules/@emurgo/cross-csl-browser/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" } }, "node_modules/@emurgo/cross-csl-core": { @@ -2601,13 +2684,105 @@ } }, "node_modules/@emurgo/cross-csl-nodejs": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-nodejs/-/cross-csl-nodejs-4.4.0.tgz", - "integrity": "sha512-yDtNFCYobYL7hILvico3Q85DIvDhc5H24UjDd8gdYApu6YGyR5C+Roz34VALxHlR8y2RA9cUM2GUt+a8Ev/Kxg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-nodejs/-/cross-csl-nodejs-5.0.1.tgz", + "integrity": "sha512-fu4Cif9xWfjFS7ue391KgPK4OdOaeRkiMtlTNrqiOReFicXAyJirpCgH3DZ+Mb2qJkffW9NJX75TXDqpewjoGw==", "dev": true, "dependencies": { - "@emurgo/cardano-serialization-lib-nodejs": "12.0.0-alpha.26", - "@emurgo/cross-csl-core": "4.4.0" + "@emurgo/cardano-serialization-lib-nodejs": "12.0.1", + "@emurgo/cross-csl-core": "5.0.1" + } + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/@cardano-foundation/ledgerjs-hw-app-cardano": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@cardano-foundation/ledgerjs-hw-app-cardano/-/ledgerjs-hw-app-cardano-5.1.0.tgz", + "integrity": "sha512-ucuz/XbS/0ZD0Bal/GI/kiTm9jDIl8J+A7ypEqcAcBDGicFsyWmtPotOTwuDovTsiM8+eA/5OGTFX0oRqzxstQ==", + "dev": true, + "dependencies": { + "@ledgerhq/hw-transport": "^5.12.0", + "@types/ledgerhq__hw-transport": "^4.21.3", + "base-x": "^3.0.5", + "bech32": "^1.1.4", + "blake2": "^4.0.2", + "int64-buffer": "^1.0.1" + } + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/@cardano-foundation/ledgerjs-hw-app-cardano/node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "dev": true + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/@emurgo/cross-csl-core": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-core/-/cross-csl-core-5.0.1.tgz", + "integrity": "sha512-PlNsW3GjqlJ7mTrHqY+M6mGkLnWh++6PAok1rdJwUP7bYS24PE2Fm4JeO1uK0dtv9mbpVLlXyjybH+HSRV7a0Q==", + "dev": true, + "dependencies": { + "@cardano-foundation/ledgerjs-hw-app-cardano": "^5.0.0", + "@types/mocha": "^9.1.1", + "axios": "^0.24.0", + "bech32": "^2.0.0", + "bignumber.js": "^9.0.1", + "blake2b": "^2.1.4", + "hash-wasm": "^4.9.0", + "mocha": "^10.0.0" + } + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/@ledgerhq/devices": { + "version": "5.51.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.51.1.tgz", + "integrity": "sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==", + "dev": true, + "dependencies": { + "@ledgerhq/errors": "^5.50.0", + "@ledgerhq/logs": "^5.50.0", + "rxjs": "6", + "semver": "^7.3.5" + } + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/@ledgerhq/errors": { + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.50.0.tgz", + "integrity": "sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==", + "dev": true + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/@ledgerhq/hw-transport": { + "version": "5.51.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz", + "integrity": "sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==", + "dev": true, + "dependencies": { + "@ledgerhq/devices": "^5.51.1", + "@ledgerhq/errors": "^5.50.0", + "events": "^3.3.0" + } + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/@ledgerhq/logs": { + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.50.0.tgz", + "integrity": "sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==", + "dev": true + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/axios": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.4" + } + }, + "node_modules/@emurgo/cross-csl-nodejs/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" } }, "node_modules/@emurgo/yoroi-eutxo-txs": { @@ -2708,12 +2883,12 @@ } }, "node_modules/@emurgo/yoroi-lib": { - "version": "1.1.0-beta.1", - "resolved": "https://registry.npmjs.org/@emurgo/yoroi-lib/-/yoroi-lib-1.1.0-beta.1.tgz", - "integrity": "sha512-XaaeK8jcO4tcj/6llTKZs4HuVwIBcmmsMLSVlzAYFdCTPwdYOuLyehx+inNf/A4jf/5ZbIx5Nq9x4dLiguijYQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emurgo/yoroi-lib/-/yoroi-lib-1.2.0.tgz", + "integrity": "sha512-GHmj3StVEA9FBhbnqeOYh5iRtOhc95NKQ2y0gaVoCc3v88d7pJlybMZi7ajrFjo0VAg6X8yF+OAIITKo9NK1qQ==", "dependencies": { "@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.3", - "@emurgo/cross-csl-core": "4.4.0", + "@emurgo/cross-csl-core": "5.0.1", "@noble/hashes": "^1.3.2", "axios": "^1.7.5", "axios-cache-interceptor": "^1.5.3", @@ -2722,6 +2897,78 @@ "easy-crc": "1.1.0" } }, + "node_modules/@emurgo/yoroi-lib/node_modules/@emurgo/cross-csl-core": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-core/-/cross-csl-core-5.0.1.tgz", + "integrity": "sha512-PlNsW3GjqlJ7mTrHqY+M6mGkLnWh++6PAok1rdJwUP7bYS24PE2Fm4JeO1uK0dtv9mbpVLlXyjybH+HSRV7a0Q==", + "dependencies": { + "@cardano-foundation/ledgerjs-hw-app-cardano": "^5.0.0", + "@types/mocha": "^9.1.1", + "axios": "^0.24.0", + "bech32": "^2.0.0", + "bignumber.js": "^9.0.1", + "blake2b": "^2.1.4", + "hash-wasm": "^4.9.0", + "mocha": "^10.0.0" + } + }, + "node_modules/@emurgo/yoroi-lib/node_modules/@emurgo/cross-csl-core/node_modules/@cardano-foundation/ledgerjs-hw-app-cardano": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@cardano-foundation/ledgerjs-hw-app-cardano/-/ledgerjs-hw-app-cardano-5.1.0.tgz", + "integrity": "sha512-ucuz/XbS/0ZD0Bal/GI/kiTm9jDIl8J+A7ypEqcAcBDGicFsyWmtPotOTwuDovTsiM8+eA/5OGTFX0oRqzxstQ==", + "dependencies": { + "@ledgerhq/hw-transport": "^5.12.0", + "@types/ledgerhq__hw-transport": "^4.21.3", + "base-x": "^3.0.5", + "bech32": "^1.1.4", + "blake2": "^4.0.2", + "int64-buffer": "^1.0.1" + } + }, + "node_modules/@emurgo/yoroi-lib/node_modules/@emurgo/cross-csl-core/node_modules/@cardano-foundation/ledgerjs-hw-app-cardano/node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "node_modules/@emurgo/yoroi-lib/node_modules/@emurgo/cross-csl-core/node_modules/axios": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "dependencies": { + "follow-redirects": "^1.14.4" + } + }, + "node_modules/@emurgo/yoroi-lib/node_modules/@ledgerhq/devices": { + "version": "5.51.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.51.1.tgz", + "integrity": "sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==", + "dependencies": { + "@ledgerhq/errors": "^5.50.0", + "@ledgerhq/logs": "^5.50.0", + "rxjs": "6", + "semver": "^7.3.5" + } + }, + "node_modules/@emurgo/yoroi-lib/node_modules/@ledgerhq/errors": { + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.50.0.tgz", + "integrity": "sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==" + }, + "node_modules/@emurgo/yoroi-lib/node_modules/@ledgerhq/hw-transport": { + "version": "5.51.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz", + "integrity": "sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==", + "dependencies": { + "@ledgerhq/devices": "^5.51.1", + "@ledgerhq/errors": "^5.50.0", + "events": "^3.3.0" + } + }, + "node_modules/@emurgo/yoroi-lib/node_modules/@ledgerhq/logs": { + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.50.0.tgz", + "integrity": "sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==" + }, "node_modules/@emurgo/yoroi-lib/node_modules/axios": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", @@ -2745,6 +2992,17 @@ "node": ">= 6" } }, + "node_modules/@emurgo/yoroi-lib/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index 6fa692ba6f..de194f788a 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "5.3.0", + "version": "5.3.001", "description": "Cardano ADA wallet", "scripts": { "dev-mv2": "rimraf dev/ && NODE_OPTIONS=--openssl-legacy-provider babel-node scripts-mv2/build --type=debug --env 'mainnet'", @@ -74,8 +74,8 @@ "@babel/runtime": "7.12.18", "@babel/runtime-corejs3": "7.12.18", "@emurgo/cardano-message-signing-nodejs": "1.0.1", - "@emurgo/cardano-serialization-lib-nodejs": "12.0.0-alpha.26", - "@emurgo/cross-csl-nodejs": "4.4.0", + "@emurgo/cardano-serialization-lib-nodejs": "12.0.1", + "@emurgo/cross-csl-nodejs": "5.0.1", "@pmmmwh/react-refresh-webpack-plugin": "0.5.11", "@types/chrome": "^0.0.268", "@types/react-intl": "^3.0.0", @@ -149,12 +149,12 @@ "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", "@emurgo/cardano-message-signing-browser": "1.0.1", - "@emurgo/cardano-serialization-lib-browser": "12.0.0-alpha.26", + "@emurgo/cardano-serialization-lib-browser": "12.0.1", "@emurgo/cip14-js": "2.0.0", "@emurgo/cip4-js": "1.0.5", - "@emurgo/cross-csl-browser": "4.4.0", + "@emurgo/cross-csl-browser": "5.0.1", "@emurgo/yoroi-eutxo-txs": "0.0.2-alpha.8", - "@emurgo/yoroi-lib": "1.1.0-beta.1", + "@emurgo/yoroi-lib": "1.2.0", "@ledgerhq/hw-transport-u2f": "5.36.0-deprecated", "@ledgerhq/hw-transport-webauthn": "5.36.0-deprecated", "@ledgerhq/hw-transport-webhid": "5.51.1",