Skip to content

Commit

Permalink
Add Cronos and OkeX in cross chain
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyox committed Aug 8, 2022
1 parent 60cdd00 commit 2d28bae
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
![alt text](https://github.com/Cryptorubic/rubic-frontend/blob/master/src/assets/images/rubic-logo.svg "Rubic — Multichain DeFi platform")

# Multichain DeFi platform
[![develop](https://github.com/Cryptorubic/rubic-app/actions/workflows/develop.yml/badge.svg?branch=develop)](https://github.com/Cryptorubic/rubic-app/actions/workflows/develop.yml)

[Try our platform](https://app.rubic.exchange/)

[Read more about us](https://rubic.exchange/)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"ng-inline-svg-2": "^14.0.1",
"ngx-cookie-service": "^2.4.0",
"rubic-app-maticjs": "^2.0.56",
"rubic-sdk": "^2.8.2",
"rubic-sdk": "2.8.4-alpha.0",
"rxjs": "^7.5.5",
"symbiosis-js-sdk": "^2.7.7",
"ts-cacheable": "^1.0.5",
Expand Down
12 changes: 5 additions & 7 deletions src/app/features/earn/services/staking.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class StakingService {

public getRbcTokenBalance(): Observable<BigNumber> {
return from(this.web3Public.getTokenBalance(this.walletAddress, this.RBC_TOKEN_ADDRESS)).pipe(
map((balance: string) => Web3Pure.fromWei(balance)),
map(balance => Web3Pure.fromWei(balance)),
tap(balance => this._rbcTokenBalance$.next(balance))
);
}
Expand Down Expand Up @@ -359,12 +359,10 @@ export class StakingService {
}

public async getNftInfo(nftId: string): Promise<{ amount: BigNumber; endTimestamp: number }> {
const { amount, end } = await this.web3Public.callContractMethod(
this.NFT_CONTRACT_ADDRESS,
NFT_CONTRACT_ABI,
'locked',
{ methodArguments: [nftId] }
);
const { amount, end } = await this.web3Public.callContractMethod<{
amount: string;
end: string;
}>(this.NFT_CONTRACT_ADDRESS, NFT_CONTRACT_ABI, 'locked', { methodArguments: [nftId] });
return { amount: Web3Pure.fromWei(amount), endTimestamp: Number(end) * 1000 };
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class CrossChainRoutingService extends TradeService {
);
}

private readonly defaultTimeout = 20_000;
private readonly defaultTimeout = 25_000;

public crossChainTrade: WrappedCrossChainTrade;

Expand Down Expand Up @@ -324,7 +324,7 @@ export class CrossChainRoutingService extends TradeService {
this.smartRouting = {
fromProvider: this.crossChainTrade.trade.itType.from,
toProvider: this.crossChainTrade.trade.itType.to,
bridgeProvider: this.crossChainTrade.trade.subType
bridgeProvider: (this.crossChainTrade.trade as LifiCrossChainTrade).subType
};
} else if (this.crossChainTrade.trade.type === CROSS_CHAIN_TRADE_TYPE.SYMBIOSIS) {
this.smartRouting = {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14185,10 +14185,10 @@ rubic-app-maticjs@^2.0.56:
query-string "6.8.1"
web3 "^1.3.5"

rubic-sdk@^2.8.2:
version "2.8.2"
resolved "https://registry.yarnpkg.com/rubic-sdk/-/rubic-sdk-2.8.2.tgz#461978ac0b1ba7a8bcd8d723cfd1775e9161e336"
integrity sha512-ullyWW4jkGTwYitM/X758JLUw2gRcnsuoTkn5S/qVTjRhXzLKgrPjwJZ0Z7/OvpVjt6+CxCp2TvPlRCp3oKXcA==
[email protected].4-alpha.0:
version "2.8.4-alpha.0"
resolved "https://registry.yarnpkg.com/rubic-sdk/-/rubic-sdk-2.8.4-alpha.0.tgz#19e2f37a2b66aff4da702183d9d1ae76da7de8a8"
integrity sha512-B4bv+Y7vxZmUs0n6sqDOKgeIwcBGuAYikYH0rlF4IVEnovV80M9Ml86vthhYvbhqwDaXgBBJe95gRFrG8AX2Tw==
dependencies:
"@lifi/sdk" "^1.0.2"
assert "^2.0.0"
Expand Down

0 comments on commit 2d28bae

Please sign in to comment.