rainbow-swap-sdk 1.1.11 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CalculatedSwapRoute } from '../types/calculated-swap-route.type';
|
|
2
2
|
export declare const getIsRainbowWalletActive: (ownerAddress: string) => Promise<boolean>;
|
|
3
|
-
export declare const getIsActivationRequired: (
|
|
3
|
+
export declare const getIsActivationRequired: (bestRoute: CalculatedSwapRoute[], isRainbowWalletActive: boolean) => Promise<boolean>;
|
|
@@ -15,14 +15,8 @@ const getIsRainbowWalletActive = async (ownerAddress) => {
|
|
|
15
15
|
return state.state.type === 'active';
|
|
16
16
|
};
|
|
17
17
|
exports.getIsRainbowWalletActive = getIsRainbowWalletActive;
|
|
18
|
-
const getIsActivationRequired = async (
|
|
18
|
+
const getIsActivationRequired = async (bestRoute, isRainbowWalletActive) => {
|
|
19
19
|
const isRainbowContractCalled = bestRoute.some(swapRoute => swapRoute.type === swap_route_type_enum_1.SwapRouteType.Rainbow);
|
|
20
|
-
|
|
21
|
-
const isRainbowWalletActive = await (0, exports.getIsRainbowWalletActive)(senderAddress);
|
|
22
|
-
return !isRainbowWalletActive;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
20
|
+
return isRainbowContractCalled && !isRainbowWalletActive;
|
|
27
21
|
};
|
|
28
22
|
exports.getIsActivationRequired = getIsActivationRequired;
|
package/package.json
CHANGED