Skip to content

Commit d3f4591

Browse files
feat: add RIF Wallet Deployment as default contact (#831)
Co-authored-by: Jesse Clark <hello@developerjesse.com>
1 parent 047a40b commit d3f4591

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

src/redux/slices/contactsSlice/constants.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ export const testnetContacts: Record<string, Contact> = {
3232
displayAddress: TESTNET.rskOwnerAddress,
3333
isEditable: false,
3434
},
35+
[TESTNET.rifWalletDeployment]: {
36+
address: TESTNET.rifWalletDeployment,
37+
name: 'RIF Wallet Deployment',
38+
displayAddress: TESTNET.rifWalletDeployment,
39+
isEditable: false,
40+
},
3541
}
3642

3743
export const mainnetContacts: Record<string, Contact> = {
@@ -59,4 +65,10 @@ export const mainnetContacts: Record<string, Contact> = {
5965
displayAddress: MAINNET.rskOwnerAddress,
6066
isEditable: false,
6167
},
68+
[MAINNET.rifWalletDeployment]: {
69+
address: MAINNET.rifWalletDeployment,
70+
name: 'RIF Wallet Deployment',
71+
displayAddress: MAINNET.rifWalletDeployment,
72+
isEditable: false,
73+
},
6274
}

src/screens/rnsManager/addresses.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
"fifsAddrRegistrarAddress": "0x90734bd6bf96250a7b262e2bc34284b0d47c1e8d",
55
"rifTokenAddress": "0x19f64674d8a5b4e652319f5e239efd3bc969a1fe",
66
"rnsRegistryAddress": "0x7d284aaac6e925aad802a53c0c69efe3764597b8",
7+
"rifWalletDeployment": "0x0000000000000000000000000000000000000000",
78
"rBTCFaucet": "0x88250f772101179a4ecfaa4b92a983676a3ce445"
89
},
910
"MAINNET": {
1011
"rskOwnerAddress": "0x45d3e4fb311982a06ba52359d44cb4f5980e0ef1",
1112
"fifsAddrRegistrarAddress": "0xd9c79ced86ecf49f5e4a973594634c83197c35ab",
1213
"rifTokenAddress": "0x2acc95758f8b5f583470ba265eb685a8f45fc9d5",
13-
"rnsRegistryAddress": "0xcb868aeabd31e2b66f74e9a55cf064abb31a4ad5"
14+
"rnsRegistryAddress": "0xcb868aeabd31e2b66f74e9a55cf064abb31a4ad5",
15+
"rifWalletDeployment": "0x0000000000000000000000000000000000000000"
1416
}
1517
}

src/screens/transactionSummary/TransactionSummaryComponent.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ export const TransactionSummaryComponent = ({
5555
const chainId = useAppSelector(selectChainId)
5656
const { bottom } = useSafeAreaInsets()
5757
const { t } = useTranslation()
58-
const { status, tokenValue, fee, usdValue, time, hashId } = transaction
58+
const { status, tokenValue, fee, usdValue, time, hashId, to, from } =
59+
transaction
5960

6061
const iconObject = transactionStatusToIconPropsMap.get(status)
6162
const transactionStatusText = transactionStatusDisplayText.get(status)
6263

63-
const amIReceiver =
64-
transaction.amIReceiver ?? isMyAddress(wallet, transaction.to)
65-
const contactAddress = amIReceiver ? transaction.from || '' : transaction.to
64+
const amIReceiver = transaction.amIReceiver ?? isMyAddress(wallet, to)
65+
const contactAddress = amIReceiver ? from || '' : to
6666
const contact = useAppSelector(
6767
getContactByAddress(contactAddress.toLowerCase()),
6868
)
@@ -103,7 +103,7 @@ export const TransactionSummaryComponent = ({
103103
const openTransactionHash = () => {
104104
let explorerUrl = ''
105105

106-
if (isBitcoinAddressValid(transaction.to)) {
106+
if (isBitcoinAddressValid(to)) {
107107
explorerUrl = getWalletSetting(
108108
SETTINGS.BTC_EXPLORER_ADDRESS_URL,
109109
chainTypesById[chainId],
@@ -132,8 +132,8 @@ export const TransactionSummaryComponent = ({
132132
{title}
133133
</Typography>
134134
<TokenBalance
135-
firstValue={transaction.tokenValue}
136-
secondValue={transaction.usdValue}
135+
firstValue={tokenValue}
136+
secondValue={usdValue}
137137
contact={contactToUse}
138138
amIReceiver={amIReceiver}
139139
/>

0 commit comments

Comments
 (0)