Skip to content

Commit

Permalink
added LiFi getStatus endpoint and bumped lifi sdk version (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
vignesha22 authored Nov 25, 2022
1 parent 428db0a commit 790144a
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 74 deletions.
134 changes: 73 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "etherspot",
"version": "1.41.1",
"version": "1.41.2",
"description": "Etherspot SDK",
"keywords": [
"ether",
Expand Down Expand Up @@ -42,7 +42,7 @@
"dependencies": {
"@apollo/client": "3.4.0",
"@etherspot/contracts": "1.9.51",
"@lifi/sdk": "1.6.0",
"@lifi/sdk": "1.6.4",
"@nerdwallet/apollo-cache-policies": "1.2.1",
"class-transformer": "0.4.0",
"class-validator": "0.13.1",
Expand Down
6 changes: 5 additions & 1 deletion src/sdk/dto/advance-routes-lifi.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumber } from 'ethers';
import { Type } from 'class-transformer';
import { IsInt, IsOptional, IsPositive } from 'class-validator';
import { IsBoolean, IsInt, IsOptional, IsPositive } from 'class-validator';
import { IsAddress, IsBigNumberish } from './validators';

export class GetAdvanceRoutesLiFiDto {
Expand All @@ -26,4 +26,8 @@ export class GetAdvanceRoutesLiFiDto {
@IsOptional()
@IsAddress()
toAddress?: string;

@IsOptional()
@IsBoolean()
allowSwitchChain?: boolean;
}
13 changes: 13 additions & 0 deletions src/sdk/dto/get-LiFi-status.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { IsNumber } from "class-validator";

export class GetLiFiStatusDto {
txnHash: string;

bridge?: string;

@IsNumber()
fromChainId: number;

@IsNumber()
toChainId: number;
}
1 change: 1 addition & 0 deletions src/sdk/dto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ export * from './fetch-exchange-rates.dto';
export * from './advance-routes-lifi.dto';
export * from './get-step-transactions-lifi.dto';
export * from './name-resolution-node.dto';
export * from './get-LiFi-status.dto';
1 change: 1 addition & 0 deletions src/sdk/exchange/classes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ export * from './exchange-bridging-quote';
export * from './exchange-router-address';
export * from './step-transactions-lifi';
export * from './advance-routes-lifi';
export * from './lifi-status';
15 changes: 15 additions & 0 deletions src/sdk/exchange/classes/lifi-status.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

export class LiFiStatus {
status: string;

bridgeExplorerLink?: string;

subStatus?: string;

subStatusMsg?: string;

sendingTxnHash?: string;

receivingTxnHash?: string;

}
Loading

0 comments on commit 790144a

Please sign in to comment.