@aeternity/aepp-sdk 13.3.2 → 13.3.3

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/aepp-sdk.js CHANGED
@@ -7784,6 +7784,15 @@ function nameToPunycode(maybeName) {
7784
7784
  if (/\p{Emoji_Presentation}/u.test(name)) {
7785
7785
  throw new ArgumentError('aens name', 'not containing emoji', maybeName);
7786
7786
  }
7787
+ if (name[2] === '-' && name[3] === '-') {
7788
+ throw new ArgumentError('aens name', 'without "-" char in both the third and fourth positions', maybeName);
7789
+ }
7790
+ if (name[0] === '-') {
7791
+ throw new ArgumentError('aens name', 'starting with no "-" char', maybeName);
7792
+ }
7793
+ if (name.at(-1) === '-') {
7794
+ throw new ArgumentError('aens name', 'ending with no "-" char', maybeName);
7795
+ }
7787
7796
  let punycode;
7788
7797
  try {
7789
7798
  const u = new URL(`http://${name}.${suffix}`);
@@ -20073,7 +20082,7 @@ class AeSdkAepp extends AeSdkBase {
20073
20082
  * @returns Addresses from wallet
20074
20083
  */
20075
20084
  async askAddresses() {
20076
- this._ensureAccountAccess();
20085
+ this._ensureConnected();
20077
20086
  return this.rpcClient.request(METHODS.address, undefined);
20078
20087
  }
20079
20088
 
@@ -20466,11 +20475,14 @@ class AeSdkWallet extends AeSdk {
20466
20475
  * @returns Object with wallet information
20467
20476
  */
20468
20477
  async getWalletInfo() {
20478
+ const {
20479
+ origin
20480
+ } = window.location;
20469
20481
  return {
20470
20482
  id: this.id,
20471
20483
  name: this.name,
20472
20484
  networkId: await this.api.getNetworkId(),
20473
- origin: window.location.origin,
20485
+ origin: origin === 'file://' ? '*' : origin,
20474
20486
  type: this._type
20475
20487
  };
20476
20488
  }