mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-02-13 04:51:20 -05:00
bump version to v0.0.18
This commit is contained in:
parent
30864eea0c
commit
3b79477d84
12
dist/utils/HavenoUtils.d.ts
vendored
12
dist/utils/HavenoUtils.d.ts
vendored
@ -99,6 +99,14 @@ export default class HavenoUtils {
|
|||||||
* @return {string} the stringified form
|
* @return {string} the stringified form
|
||||||
*/
|
*/
|
||||||
static formToString(form: PaymentAccountForm): string;
|
static formToString(form: PaymentAccountForm): string;
|
||||||
|
/**
|
||||||
|
* Determine if a form has a field.
|
||||||
|
*
|
||||||
|
* @param {PaymentAccountForm} form - form to check
|
||||||
|
* @param {PaymentAccountFormField.FieldId} fieldId - id of the field to check for
|
||||||
|
* @return {boolean} true if the form has the field, false otherwise
|
||||||
|
*/
|
||||||
|
static hasFormField(form: PaymentAccountForm, fieldId: PaymentAccountFormField.FieldId): boolean;
|
||||||
/**
|
/**
|
||||||
* Get a form field value.
|
* Get a form field value.
|
||||||
*
|
*
|
||||||
@ -110,10 +118,10 @@ export default class HavenoUtils {
|
|||||||
/**
|
/**
|
||||||
* Set a form field value.
|
* Set a form field value.
|
||||||
*
|
*
|
||||||
|
* @param {PaymentAccountForm} form - form to get the field from
|
||||||
* @param {PaymentAccountFormField.FieldId} fieldId - id of the field to set the value of
|
* @param {PaymentAccountFormField.FieldId} fieldId - id of the field to set the value of
|
||||||
* @param {string} value - field value to set
|
* @param {string} value - field value to set
|
||||||
* @param {PaymentAccountForm} form - form to get the field from
|
|
||||||
* @return {string} the form field value
|
* @return {string} the form field value
|
||||||
*/
|
*/
|
||||||
static setFormValue(fieldId: PaymentAccountFormField.FieldId, value: string, form: PaymentAccountForm): void;
|
static setFormValue(form: PaymentAccountForm, fieldId: PaymentAccountFormField.FieldId, value: string): void;
|
||||||
}
|
}
|
||||||
|
18
dist/utils/HavenoUtils.js
vendored
18
dist/utils/HavenoUtils.js
vendored
@ -168,6 +168,20 @@ class HavenoUtils {
|
|||||||
}
|
}
|
||||||
return str.trim();
|
return str.trim();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Determine if a form has a field.
|
||||||
|
*
|
||||||
|
* @param {PaymentAccountForm} form - form to check
|
||||||
|
* @param {PaymentAccountFormField.FieldId} fieldId - id of the field to check for
|
||||||
|
* @return {boolean} true if the form has the field, false otherwise
|
||||||
|
*/
|
||||||
|
static hasFormField(form, fieldId) {
|
||||||
|
for (const field of form.getFieldsList()) {
|
||||||
|
if (field.getId() === fieldId)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Get a form field value.
|
* Get a form field value.
|
||||||
*
|
*
|
||||||
@ -186,12 +200,12 @@ class HavenoUtils {
|
|||||||
/**
|
/**
|
||||||
* Set a form field value.
|
* Set a form field value.
|
||||||
*
|
*
|
||||||
|
* @param {PaymentAccountForm} form - form to get the field from
|
||||||
* @param {PaymentAccountFormField.FieldId} fieldId - id of the field to set the value of
|
* @param {PaymentAccountFormField.FieldId} fieldId - id of the field to set the value of
|
||||||
* @param {string} value - field value to set
|
* @param {string} value - field value to set
|
||||||
* @param {PaymentAccountForm} form - form to get the field from
|
|
||||||
* @return {string} the form field value
|
* @return {string} the form field value
|
||||||
*/
|
*/
|
||||||
static setFormValue(fieldId, value, form) {
|
static setFormValue(form, fieldId, value) {
|
||||||
for (const field of form.getFieldsList()) {
|
for (const field of form.getFieldsList()) {
|
||||||
if (field.getId() === fieldId) {
|
if (field.getId() === fieldId) {
|
||||||
field.setValue(value);
|
field.setValue(value);
|
||||||
|
2
dist/utils/HavenoUtils.js.map
vendored
2
dist/utils/HavenoUtils.js.map
vendored
File diff suppressed because one or more lines are too long
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "haveno-ts",
|
"name": "haveno-ts",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "haveno-ts",
|
"name": "haveno-ts",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "^18.14.2",
|
"@types/node": "^18.14.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "haveno-ts",
|
"name": "haveno-ts",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"description": "Haveno TypeScript interface",
|
"description": "Haveno TypeScript interface",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user