@sundaeswap/wallet-lite 0.0.21 → 0.0.22
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.
- package/dist/cjs/classes/WalletObserver.class.js +60 -38
- package/dist/cjs/classes/WalletObserver.class.js.map +1 -1
- package/dist/esm/classes/WalletObserver.class.js +7 -1
- package/dist/esm/classes/WalletObserver.class.js.map +1 -1
- package/dist/types/classes/WalletObserver.class.d.ts.map +1 -1
- package/dist/types/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/classes/WalletObserver.class.ts +14 -2
package/package.json
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { TransactionUnspentOutput } from "@cardano-sdk/core/dist/cjs/Serialization/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
Cip30WalletApi,
|
|
4
|
+
GetCollateral,
|
|
5
|
+
} from "@cardano-sdk/dapp-connector";
|
|
3
6
|
import { AssetAmount, type IAssetAmountMetadata } from "@sundaeswap/asset";
|
|
4
7
|
import merge from "lodash/merge.js";
|
|
5
8
|
|
|
@@ -517,7 +520,16 @@ export class WalletObserver<
|
|
|
517
520
|
}
|
|
518
521
|
|
|
519
522
|
const [cbor, { Serialization }, { typedHex }] = await Promise.all([
|
|
520
|
-
|
|
523
|
+
(async () => {
|
|
524
|
+
const funcCall =
|
|
525
|
+
this.api?.getCollateral ||
|
|
526
|
+
(this.api?.experimental.getCollateral as GetCollateral);
|
|
527
|
+
if (typeof funcCall !== "function") {
|
|
528
|
+
return [];
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return await funcCall();
|
|
532
|
+
})(),
|
|
521
533
|
getCardanoCore(),
|
|
522
534
|
getCardanoUtil(),
|
|
523
535
|
]);
|