1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00
squid-js/src/aquarius/AquariusProvider.ts

21 lines
491 B
TypeScript
Raw Normal View History

2018-10-26 11:57:26 +02:00
import ConfigProvider from "../ConfigProvider"
2018-10-26 10:40:46 +02:00
import Aquarius from "./Aquarius"
2018-10-25 17:26:26 +02:00
export default class AquariusProvider {
2018-10-26 10:40:46 +02:00
public static setAquarius(aquarius: Aquarius) {
2018-10-25 17:26:26 +02:00
AquariusProvider.aquarius = aquarius
}
public static getAquarius() {
2018-10-26 10:40:46 +02:00
if (!AquariusProvider.aquarius) {
2018-10-26 11:57:26 +02:00
AquariusProvider.aquarius = new Aquarius(ConfigProvider.getConfig())
2018-10-26 10:40:46 +02:00
}
2018-10-25 17:26:26 +02:00
return AquariusProvider.aquarius
}
2018-10-26 10:40:46 +02:00
private static aquarius: Aquarius = null
2018-10-25 17:26:26 +02:00
}