Skip to content

Commit 1e9e835

Browse files
move yoroi drep constant hash to staking package
1 parent b31c9b9 commit 1e9e835

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

apps/wallet-mobile/src/features/Banners/useCases/ConsiderDRepToUsStakingCenterBanner.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as React from 'react'
44

55
import {useSelectedWallet} from '../../WalletManager/common/hooks/useSelectedWallet'
66
import {DelegateToYoroiDRepBanner} from '../common/DelegateToYoroiDRepBanner/DelegateToYoroiDRepBanner'
7+
import {GOVERNANCE_YOROI_DREP_ID_HEX} from '@yoroi/staking'
78

89
export const ConsiderDRepToUsStakingCenterBanner = () => {
910
const {
@@ -12,7 +13,7 @@ export const ConsiderDRepToUsStakingCenterBanner = () => {
1213
const {dismiss, dismissedAt} = useBanner({id: Banners.Id.DRep2UsStakingCenter, manager})
1314

1415
const isVisible = shouldShowDRep2UsOnStakingCenter({
15-
yoroiDRepIdHex: '1',
16+
yoroiDRepIdHex: GOVERNANCE_YOROI_DREP_ID_HEX,
1617
currentDRepIdHex: 'hi',
1718
isStaking: true,
1819
dismissedAt,

apps/wallet-mobile/src/features/Banners/useCases/ConsiderDRepToUsTxHistoryBanner.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as React from 'react'
44

55
import {useSelectedWallet} from '../../WalletManager/common/hooks/useSelectedWallet'
66
import {DelegateToYoroiDRepBanner} from '../common/DelegateToYoroiDRepBanner/DelegateToYoroiDRepBanner'
7+
import {GOVERNANCE_YOROI_DREP_ID_HEX} from '@yoroi/staking'
78

89
export const ConsiderDRepToUsTxHistoryBanner = () => {
910
const {
@@ -12,7 +13,7 @@ export const ConsiderDRepToUsTxHistoryBanner = () => {
1213
const {dismiss, dismissedAt} = useBanner({id: Banners.Id.DRep2UsTxHistory, manager})
1314

1415
const isVisible = shouldShowDRep2UsOnTxHistory({
15-
yoroiDRepIdHex: '1',
16+
yoroiDRepIdHex: GOVERNANCE_YOROI_DREP_ID_HEX,
1617
currentDRepIdHex: 'hi',
1718
isStaking: true,
1819
dismissedAt,

apps/wallet-mobile/src/kernel/constants.ts

-3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,3 @@ export const configCurrencies = freeze({
5757
nativeName: 'US Dollar',
5858
},
5959
})
60-
61-
// NOTE: bech32 'drep1ygr9tuapcanc3kpeyy4dc3vmrz9cfe5q7v9wj3x9j0ap3tswtre9j'
62-
export const yoroiDRepIdHex = '220655f3a1c76788d839212adc459b188b84e680f30ae944c593fa18ae'

packages/staking/src/governance/config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ export const GOVERNANCE_ENDPOINTS: Readonly<
2727
'https://yoroi-backend-zero-preview.emurgornd.com/dreps/{{DREP_ID}}/state',
2828
},
2929
} as const
30+
31+
// NOTE: bech32 'drep1ygr9tuapcanc3kpeyy4dc3vmrz9cfe5q7v9wj3x9j0ap3tswtre9j'
32+
export const GOVERNANCE_YOROI_DREP_ID_HEX =
33+
'220655f3a1c76788d839212adc459b188b84e680f30ae944c593fa18ae'

packages/staking/src/governance/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ export {
1616
convertHexKeyHashToBech32Format,
1717
convertDrepHashToCIP129Format,
1818
} from './helpers'
19+
export {GOVERNANCE_YOROI_DREP_ID_HEX} from './config'
1920
export type {StakingKeyState} from './types'

0 commit comments

Comments
 (0)