Skip to content

Commit

Permalink
chore: address minor review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Apr 18, 2024
1 parent 1459b1e commit 874abc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions lib/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type LiquidChainConfig = ChainConfig & {

type PreferredWallet = 'lnd' | 'core' | undefined;

type BaseCurrencyConfig = {
type BaseCurrencyConfig<T = ChainConfig> = {
symbol: string;
network: Network;

Expand All @@ -62,7 +62,7 @@ type BaseCurrencyConfig = {

maxZeroConfAmount: number;

chain: ChainConfig;
chain: T;
};

type RoutingOffsetException = {
Expand Down Expand Up @@ -185,9 +185,7 @@ type ConfigType = {
pairs: PairConfig[];
currencies: CurrencyConfig[];

liquid?: Omit<BaseCurrencyConfig, 'chain'> & {
chain: LiquidChainConfig;
};
liquid?: BaseCurrencyConfig<LiquidChainConfig>;

rsk?: RskConfig;
ethereum: EthereumConfig;
Expand Down
4 changes: 2 additions & 2 deletions lib/chain/ElementsWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class ElementsWrapper
this.emit('block', blockHeight),
);

// Only emit confirmed transactions from the public client when a lowball
// client is configured
// If we have a lowball client, bubble up only confirmed transactions
// of the public client
const hasLowball = this.lowballClient() !== undefined;

this.publicClient().on('transaction', ({ transaction, confirmed }) => {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/chain/ElementsWrapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('ElementsWrapper', () => {
wrapper.disconnect();
});

test('should have currenType', () => {
test('should have currencyType', () => {
expect(wrapper.currencyType).toEqual(CurrencyType.Liquid);
});

Expand Down

0 comments on commit 874abc9

Please sign in to comment.