Commit fdc018c 1 parent 19fc24d commit fdc018c Copy full SHA for fdc018c
File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -788,11 +788,11 @@ export const initCoinjoinService =
788
788
} ) ;
789
789
790
790
try {
791
- const settings = getCoinjoinConfig ( symbol , environment ) ;
791
+ const config = getCoinjoinConfig ( symbol , environment ) ;
792
792
const service = await CoinjoinService . createInstance ( {
793
793
network : symbol ,
794
794
prison,
795
- settings,
795
+ settings : { ... config , ... debug ?. coinjoinConfigOverride ?. [ symbol ] } ,
796
796
} ) ;
797
797
if ( isCoinjoinDisabledByFeatureFlag ) {
798
798
dispatch ( clientEnableFailed ( symbol ) ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ import type { PartialRecord } from '@trezor/type-utils';
9
9
import type { CoinjoinServerEnvironment } from 'src/types/wallet/coinjoin' ;
10
10
import type { NetworkSymbol } from '@suite-common/wallet-config' ;
11
11
12
- export type CoinjoinNetworksConfig = CoinjoinBackendSettings & CoinjoinClientSettings ;
12
+ export type CoinjoinNetworksConfig = CoinjoinBackendSettings &
13
+ CoinjoinClientSettings & { blockbookUrls : string [ ] } ;
13
14
14
15
type ServerEnvironment = PartialRecord < CoinjoinServerEnvironment , CoinjoinNetworksConfig > ;
15
16
@@ -167,13 +168,13 @@ export const ANONYMITY_GAINS_HINDSIGHT_DAYS = 30;
167
168
export const getCoinjoinConfig = (
168
169
network : NetworkSymbol ,
169
170
environment ?: CoinjoinServerEnvironment ,
170
- ) => {
171
+ ) : CoinjoinNetworksConfig => {
171
172
const config = COINJOIN_NETWORKS [ network ] ;
172
173
const settings = config
173
174
? config [ environment ?? ( Object . keys ( config ) [ 0 ] as CoinjoinServerEnvironment ) ]
174
175
: undefined ;
175
176
if ( ! settings )
176
177
throw new Error ( `Missing settings for coinjoin network ${ network } env ${ environment } ` ) ;
177
178
178
- return settings ;
179
+ return { affiliationId : 'trezor' , ... settings } ;
179
180
} ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
15
15
EndRoundState ,
16
16
WabiSabiProtocolErrorCode ,
17
17
} from '@trezor/coinjoin/src/enums' ;
18
+ import type { CoinjoinNetworksConfig } from 'src/services/coinjoin' ;
18
19
19
20
export { EndRoundState , WabiSabiProtocolErrorCode } ;
20
21
export type { RoundPhase , SessionPhase } ;
@@ -100,6 +101,7 @@ export type CoinjoinServerEnvironment = 'public' | 'staging' | 'localhost';
100
101
export interface CoinjoinDebugSettings {
101
102
coinjoinAllowNoTor ?: boolean ;
102
103
coinjoinServerEnvironment ?: PartialRecord < NetworkSymbol , CoinjoinServerEnvironment > ;
104
+ coinjoinConfigOverride ?: PartialRecord < NetworkSymbol , Partial < CoinjoinNetworksConfig > > ;
103
105
}
104
106
105
107
export interface CoinjoinConfig {
You can’t perform that action at this time.
0 commit comments