Skip to content

Commit 403bc8a

Browse files
fix: minor fix
1 parent c536c16 commit 403bc8a

11 files changed

Lines changed: 3692 additions & 3241 deletions

File tree

packages/extension/src/libs/spark-handler/callRPC.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export async function callRPC<T = any>(
2121
},
2222
}
2323
);
24+
25+
if (!response.data || response.data.result === undefined) {
26+
throw new Error('Invalid RPC response structure');
27+
}
2428
return response.data.result;
2529
} catch (error) {
2630
console.error("RPC Error:", error);

packages/extension/src/providers/bitcoin/libs/api-firo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class API implements ProviderAPIInterface {
2828
return getBitcoinAddress(pubkey, this.networkInfo);
2929
}
3030

31-
// eslint-disable-next-line @typescript-eslint/no-empty-function
31+
3232
async init(): Promise<void> {}
3333

3434
async getRawTransaction(hash: string): Promise<string | null> {
@@ -133,7 +133,7 @@ class API implements ProviderAPIInterface {
133133
ret.sort((a, b) => {
134134
return a.value - b.value;
135135
});
136-
return [ret.at(-1)!]; // TODO: check or filter same values
136+
return ret;
137137
}
138138

139139
async getUTXOs(pubkey: string): Promise<HaskoinUnspentType[]> {
@@ -145,7 +145,7 @@ class API implements ProviderAPIInterface {
145145
return filterOutOrdinals(
146146
address,
147147
this.networkInfo.name,
148-
await this.FiroToHaskoinUTXOs(utxos, address)
148+
[(await this.FiroToHaskoinUTXOs(utxos, address)).at(-1)!]
149149
).then((futxos) => {
150150
futxos.sort((a, b) => {
151151
return a.value - b.value;

packages/extension/src/providers/bitcoin/networks/firo-testnet.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { NetworkNames } from "@enkryptcom/types";
2+
import icon from './icons/firo.svg';
23
import {
34
BitcoinNetwork,
45
BitcoinNetworkOptions,
@@ -18,7 +19,7 @@ const firoOptions: BitcoinNetworkOptions = {
1819
isTestNetwork: true,
1920
currencyName: "tFIRO",
2021
currencyNameLong: "tFiro",
21-
icon: require("./icons/firo.svg"),
22+
icon,
2223
decimals: 8,
2324
node: "https://testexplorer.firo.org",
2425
coingeckoID: "zcoin",

packages/extension/src/providers/bitcoin/networks/firo.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { NetworkNames } from "@enkryptcom/types";
2+
import icon from './icons/firo.svg';
23
import {
34
BitcoinNetwork,
45
BitcoinNetworkOptions,
@@ -18,7 +19,7 @@ const firoOptions: BitcoinNetworkOptions = {
1819
isTestNetwork: false,
1920
currencyName: "FIRO",
2021
currencyNameLong: "Firo",
21-
icon: require("./icons/firo.svg"),
22+
icon,
2223
decimals: 8,
2324
node: "https://explorer.firo.org",
2425
coingeckoID: "zcoin",

packages/extension/src/providers/bitcoin/ui/send-transaction/components/send-spark-address-input.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
</template>
3434

3535
<script setup lang="ts">
36-
import { computed } from "@vue/reactivity";
37-
import { PropType, ref } from "vue";
36+
import { PropType, ref, computed } from "vue";
3837
import { isAddress, isSparkAddress } from "@/providers/bitcoin/libs/utils";
3938
import { BitcoinNetwork } from "@/providers/bitcoin/types/bitcoin-network";
4039
@@ -83,7 +82,7 @@ const changeFocus = (val: FocusEvent) => {
8382
</script>
8483

8584
<style lang="less">
86-
@import "~@action/styles/theme.less";
85+
@import "@action/styles/theme.less";
8786
8887
.send-address-input {
8988
height: 64px;

packages/extension/src/providers/bitcoin/ui/send-transaction/tabs/spark-send-tab.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ const close = () => {
266266
</script>
267267

268268
<style lang="less" scoped>
269-
@import "~@action/styles/theme.less";
270-
@import "~@action/styles/custom-scroll.less";
269+
@import "@action/styles/theme.less";
270+
@import "@action/styles/custom-scroll.less";
271271
272272
.form__container {
273273
display: flex;

packages/extension/src/providers/bitcoin/ui/send-transaction/tabs/transparent-send-tab.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@ const sendAction = async () => {
575575
</script>
576576

577577
<style lang="less" scoped>
578-
@import "~@action/styles/theme.less";
579-
@import "~@action/styles/custom-scroll.less";
578+
@import "@action/styles/theme.less";
579+
@import "@action/styles/custom-scroll.less";
580580
581581
.form__container {
582582
display: flex;

packages/extension/src/ui/action/views/verify-send-from-spark-transaction/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
</template>
6969

7070
<script setup lang="ts">
71-
import { onBeforeMount, ref, ComponentPublicInstance, defineEmits } from "vue";
71+
import { onBeforeMount, ref, ComponentPublicInstance } from "vue";
7272
import { useRoute, useRouter } from "vue-router";
7373
import CloseIcon from "@action/icons/common/close-icon.vue";
7474
import BaseButton from "@action/components/base-button/index.vue";
@@ -215,8 +215,8 @@ const isHasScroll = () => {
215215
</script>
216216

217217
<style lang="less" scoped>
218-
@import "~@action/styles/theme.less";
219-
@import "~@action/styles/custom-scroll.less";
218+
@import "@action/styles/theme.less";
219+
@import "@action/styles/custom-scroll.less";
220220
221221
.container {
222222
width: 100%;

packages/extension/src/ui/action/views/verify-send-to-spark-transaction/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ const isHasScroll = () => {
216216
</script>
217217

218218
<style lang="less" scoped>
219-
@import "~@action/styles/theme.less";
220-
@import "~@action/styles/custom-scroll.less";
219+
@import "@action/styles/theme.less";
220+
@import "@action/styles/custom-scroll.less";
221221
222222
.container {
223223
width: 100%;

packages/hw-wallets/src/ledger/bitcoin/configs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NetworkNames } from "@enkryptcom/types";
2-
import { bip44Paths } from "@src/configs";
2+
import { bip44Paths } from "../../configs";
33

44
const supportedPaths = {
55
[NetworkNames.Bitcoin]: [bip44Paths.bitcoinSegwitLedger],

0 commit comments

Comments
 (0)