Skip to content

Commit

Permalink
Merge branch 'master' into id-933
Browse files Browse the repository at this point in the history
  • Loading branch information
IDIDOS authored Dec 28, 2024
2 parents 31f1ba7 + 06969c0 commit f009338
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 33 deletions.
3 changes: 2 additions & 1 deletion src/app/core/errors/models/rubic-sdk-error-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ export class RubicSdkErrorParser {

if (
err.message.includes('price change more than your slippage!') ||
err.message.includes('Return amount is not enough')
err.message.includes('Return amount is not enough') ||
err.message.includes('execution reverted: Slippage Limit Exceeded')
) {
return new LowSlippageError();
}
Expand Down
20 changes: 17 additions & 3 deletions src/app/core/services/gas-service/gas.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,25 @@ export class GasService {
maxAge: GasService.requestInterval
})
private fetchBscGas(): Observable<GasPrice> {
return of({
gasPrice: new BigNumber(5).dividedBy(10 ** 9).toFixed()
});
const blockchainAdapter = Injector.web3PublicService.getWeb3Public(
BLOCKCHAIN_NAME.BINANCE_SMART_CHAIN
);
return from(blockchainAdapter.getGasPrice()).pipe(
map((gasPriceInWei: string) => {
const gasPriceinGwei = new BigNumber(gasPriceInWei).dividedBy(10 ** 9);
if (gasPriceinGwei.lt(1)) {
return {
gasPrice: new BigNumber(1).dividedBy(10 ** 9).toFixed()
};
}
return {
gasPrice: gasPriceinGwei.dividedBy(10 ** 9).toFixed()
};
})
);
}

// 508281 BNB
/**
* Gets Polygon gas from gas station api.
* @return Observable<number> Average gas price in Gwei.
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/retrodrop/services/retrodrop.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class RetrodropService extends ClaimService {
public readonly isUserParticipantOfRetrodrop$ =
this._isUserParticipantOfRetrodrop$.asObservable();

private readonly EXPIRED_ROUNDS_NUMBER = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
private readonly EXPIRED_ROUNDS_NUMBER = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];

constructor(private readonly retrodropApiService: RetrodropApiService) {
super();
Expand Down
31 changes: 3 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18481,16 +18481,7 @@ string-range@~1.2, string-range@~1.2.1:
resolved "https://registry.yarnpkg.com/string-range/-/string-range-1.2.2.tgz#a893ed347e72299bc83befbbf2a692a8d239d5dd"
integrity sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w==

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -18591,7 +18582,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -18619,13 +18610,6 @@ strip-ansi@^5.1.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -21035,7 +21019,7 @@ workerpool@^6.5.1:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"
integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -21053,15 +21037,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit f009338

Please sign in to comment.