File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -1891,16 +1891,20 @@ export async function getContactsByXkeyId(
1891
1891
let contactsXkeys = { }
1892
1892
1893
1893
for await ( let c of appState . contacts ) {
1894
- let og = Object . values ( c . outgoing ) ?. [ 0 ]
1895
- let ic = Object . values ( c . incoming ) ?. [ 0 ]
1894
+ let og = Object . values ( c . outgoing || [ ] ) ?. [ 0 ]
1895
+ let ic = Object . values ( c . incoming || [ ] ) ?. [ 0 ]
1896
1896
1897
- contactsXkeys [ og . xkeyId ] = {
1898
- ...c ,
1899
- dir : 'outgoing' ,
1897
+ if ( og ) {
1898
+ contactsXkeys [ og . xkeyId ] = {
1899
+ ...c ,
1900
+ dir : 'outgoing' ,
1901
+ }
1900
1902
}
1901
- contactsXkeys [ ic . xkeyId ] = {
1902
- ...c ,
1903
- dir : 'incoming' ,
1903
+ if ( ic ) {
1904
+ contactsXkeys [ ic . xkeyId ] = {
1905
+ ...c ,
1906
+ dir : 'incoming' ,
1907
+ }
1904
1908
}
1905
1909
}
1906
1910
@@ -1937,8 +1941,8 @@ export async function deriveContactAddrs(
1937
1941
let addrs = { }
1938
1942
1939
1943
for await ( let c of appState . contacts ) {
1940
- let og = Object . values ( c [ dir ] ) ?. [ 0 ]
1941
- let xkey = og . xpub || og . xprv
1944
+ let og = Object . values ( c [ dir ] || [ ] ) ?. [ 0 ]
1945
+ let xkey = og ? .xpub || og ? .xprv
1942
1946
1943
1947
if ( xkey ) {
1944
1948
let contactWallet = await deriveWalletData (
You can’t perform that action at this time.
0 commit comments