@xrplkit/xls26 2.3.1 → 2.4.0

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.
Files changed (2) hide show
  1. package/package.json +1 -4
  2. package/xls26.js +5 -4
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@xrplkit/xls26",
3
3
  "type": "module",
4
- "version": "2.3.1",
4
+ "version": "2.4.0",
5
5
  "main": "xls26.js",
6
6
  "dependencies": {
7
7
  "@xrplkit/toml": "1.0.0"
8
8
  },
9
- "publishConfig": {
10
- "access": "public"
11
- },
12
9
  "keywords": [
13
10
  "xrpl",
14
11
  "xls-26",
package/xls26.js CHANGED
@@ -83,6 +83,7 @@ const issuerFields = [
83
83
  const tokenFields = [
84
84
  {
85
85
  key: 'currency',
86
+ alternativeKeys: ['code'],
86
87
  essential: true,
87
88
  validate: v => {
88
89
  if(typeof v !== 'string' && v.length < 3)
@@ -203,8 +204,8 @@ export function parse(str){
203
204
  let advisories = []
204
205
 
205
206
 
206
- if(toml.ISSUERS){
207
- for(let stanza of toml.ISSUERS){
207
+ if((toml.ISSUERS || toml.ACCOUNTS)){
208
+ for(let stanza of (toml.ISSUERS || toml.ACCOUNTS)){
208
209
  let { valid, parsed: issuer, issues: issuerIssues } = parseStanza(stanza, issuerFields)
209
210
 
210
211
  if(valid)
@@ -237,8 +238,8 @@ export function parse(str){
237
238
  }
238
239
  }
239
240
 
240
- if(toml.TOKENS){
241
- for(let stanza of toml.TOKENS){
241
+ if((toml.TOKENS || toml.CURRENCIES)){
242
+ for(let stanza of (toml.TOKENS || toml.CURRENCIES)){
242
243
  let { valid, parsed: token, issues: tokenIssues } = parseStanza(stanza, tokenFields)
243
244
 
244
245
  if(valid)