@rainlanguage/ui-components 0.0.1-alpha.42 → 0.0.1-alpha.43
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,13 +1,13 @@
|
|
|
1
1
|
<script>import {
|
|
2
|
-
DotrainOrderGui
|
|
3
2
|
} from "@rainlanguage/orderbook/js_api";
|
|
4
3
|
import { Input } from "flowbite-svelte";
|
|
5
4
|
import ButtonSelectOption from "./ButtonSelectOption.svelte";
|
|
6
5
|
import DeploymentSectionHeader from "./DeploymentSectionHeader.svelte";
|
|
7
6
|
import { CloseCircleSolid } from "flowbite-svelte-icons";
|
|
8
7
|
import { onMount } from "svelte";
|
|
8
|
+
import { useGui } from "../../hooks/useGui";
|
|
9
9
|
export let deposit;
|
|
10
|
-
|
|
10
|
+
const gui = useGui();
|
|
11
11
|
let error = "";
|
|
12
12
|
let currentDeposit;
|
|
13
13
|
let inputValue = "";
|
|
@@ -47,8 +47,7 @@ const getTokenSymbol = async () => {
|
|
|
47
47
|
function handlePresetClick(preset) {
|
|
48
48
|
if (deposit.token?.key) {
|
|
49
49
|
inputValue = preset;
|
|
50
|
-
gui
|
|
51
|
-
gui = gui;
|
|
50
|
+
gui.saveDeposit(deposit.token?.key, preset);
|
|
52
51
|
try {
|
|
53
52
|
currentDeposit = getCurrentDeposit();
|
|
54
53
|
} catch (e) {
|
|
@@ -60,8 +59,7 @@ function handleInput(e) {
|
|
|
60
59
|
if (deposit.token?.key) {
|
|
61
60
|
if (e.currentTarget instanceof HTMLInputElement) {
|
|
62
61
|
inputValue = e.currentTarget.value;
|
|
63
|
-
gui
|
|
64
|
-
gui = gui;
|
|
62
|
+
gui.saveDeposit(deposit.token.key, e.currentTarget.value);
|
|
65
63
|
try {
|
|
66
64
|
currentDeposit = getCurrentDeposit();
|
|
67
65
|
} catch (e2) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import {
|
|
2
|
+
import { type GuiDepositCfg } from '@rainlanguage/orderbook/js_api';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
deposit: GuiDepositCfg;
|
|
6
|
-
gui: DotrainOrderGui;
|
|
7
6
|
};
|
|
8
7
|
events: {
|
|
9
8
|
[evt: string]: CustomEvent<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rainlanguage/ui-components",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.43",
|
|
4
4
|
"description": "A component library for building Svelte applications to be used with Raindex.",
|
|
5
5
|
"license": "LicenseRef-DCL-1.0",
|
|
6
6
|
"author": "Rain Open Source Software Ltd",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@fontsource/dm-sans": "5.1.0",
|
|
54
54
|
"@imask/svelte": "7.6.1",
|
|
55
55
|
"@observablehq/plot": "0.6.16",
|
|
56
|
-
"@rainlanguage/orderbook": "0.0.1-alpha.
|
|
56
|
+
"@rainlanguage/orderbook": "0.0.1-alpha.43",
|
|
57
57
|
"@reown/appkit": "1.6.4",
|
|
58
58
|
"@reown/appkit-adapter-wagmi": "1.6.4",
|
|
59
59
|
"@sentry/sveltekit": "7.120.0",
|