File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed
packages/sources/token-balance Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @chainlink/token-balance-adapter ' : patch
3
+ ---
4
+
5
+ Log warning instead of error when XRPL_RPC_URL is not set.
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export class XrplTransport extends SubscriptionTransport<BaseEndpointTypes> {
56
56
this . requester = dependencies . requester
57
57
58
58
if ( ! adapterSettings . XRPL_RPC_URL ) {
59
- logger . error ( 'Environment variable XRPL_RPC_URL is missing' )
59
+ logger . warn ( 'Environment variable XRPL_RPC_URL is missing' )
60
60
}
61
61
}
62
62
Original file line number Diff line number Diff line change @@ -39,10 +39,11 @@ jest.mock('ethers', () => ({
39
39
} ) )
40
40
41
41
const log = jest . fn ( )
42
+ const warningLog = jest . fn ( )
42
43
const logger = {
43
44
fatal : log ,
44
45
error : log ,
45
- warn : log ,
46
+ warn : warningLog ,
46
47
info : log ,
47
48
debug : log ,
48
49
trace : log ,
@@ -169,6 +170,7 @@ describe('XrplTransport', () => {
169
170
170
171
afterEach ( ( ) => {
171
172
expect ( log ) . not . toBeCalled ( )
173
+ expect ( warningLog ) . not . toBeCalled ( )
172
174
} )
173
175
174
176
describe ( 'initialize' , ( ) => {
@@ -184,9 +186,9 @@ describe('XrplTransport', () => {
184
186
transportName ,
185
187
)
186
188
187
- expect ( log ) . toBeCalledWith ( 'Environment variable XRPL_RPC_URL is missing' )
188
- expect ( log ) . toBeCalledTimes ( 1 )
189
- log . mockClear ( )
189
+ expect ( warningLog ) . toBeCalledWith ( 'Environment variable XRPL_RPC_URL is missing' )
190
+ expect ( warningLog ) . toBeCalledTimes ( 1 )
191
+ warningLog . mockClear ( )
190
192
} )
191
193
} )
192
194
@@ -562,9 +564,9 @@ describe('XrplTransport', () => {
562
564
tokenIssuerAddress,
563
565
} ) ,
564
566
) . rejects . toThrow ( 'Environment variable XRPL_RPC_URL is missing' )
565
- expect ( log ) . toBeCalledWith ( 'Environment variable XRPL_RPC_URL is missing' )
566
- expect ( log ) . toBeCalledTimes ( 1 )
567
- log . mockClear ( )
567
+ expect ( warningLog ) . toBeCalledWith ( 'Environment variable XRPL_RPC_URL is missing' )
568
+ expect ( warningLog ) . toBeCalledTimes ( 1 )
569
+ warningLog . mockClear ( )
568
570
} )
569
571
} )
570
572
} )
You can’t perform that action at this time.
0 commit comments