pakstr 0.3.2 → 0.3.4

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.
@@ -73,6 +73,11 @@ class WebViewController(
73
73
  displayZoomControls = false
74
74
 
75
75
  mixedContentMode = android.webkit.WebSettings.MIXED_CONTENT_NEVER_ALLOW
76
+
77
+ // Better mobile rendering
78
+ useWideViewPort = true
79
+ loadWithOverviewMode = true
80
+ textZoom = 100
76
81
  }
77
82
 
78
83
  // Standard clients are enough since overriding URL loading isn't required
@@ -122,18 +122,26 @@ class AmberSigner(
122
122
 
123
123
  val event = JSONObject(eventJson)
124
124
 
125
- if (!event.has("pubkey")) {
125
+ val currentPubkey = event.optString("pubkey")
126
126
 
127
- val pubkey = getPublicKey()
127
+ if (currentPubkey.isBlank()) {
128
+
129
+ val amberPubkey = getPublicKey()
130
+
131
+ require(amberPubkey.isNotBlank()) {
128
132
 
129
- require(pubkey.isNotBlank()) {
130
133
  "Amber returned empty pubkey"
134
+
131
135
  }
132
136
 
133
137
  event.put(
138
+
134
139
  "pubkey",
135
- pubkey
140
+
141
+ amberPubkey
142
+
136
143
  )
144
+
137
145
  }
138
146
 
139
147
  suspendCancellableCoroutine { continuation ->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pakstr",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "CLI for packaging Nostr web apps into Android APKs",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",