solana-studio 0.8.0 → 0.9.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e0ff18e6789fde7b36cbf2d6c29fcce763fca5c278e3b36dbf36bd8dd792df4
|
|
4
|
+
data.tar.gz: 2e6867b16a35325e78c791e96ea909b93251428d1233dd9efb19fa938ab6106f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 908f0395ddc2ee1f56133a5ec474a67d1494cd726dde4a15c6d4c0172edab971db6ba699894e298439a028cb7e7dd8a475127079ae90de41f27a8bac6a4c9838
|
|
7
|
+
data.tar.gz: d7562cb9adac4442d8853d368b9c5cc59c85158f96103a9cf5ee6192657bf9da6cde560f5e541fe1addbc26bf45d8549370fc6790b7a4d20a0fcb5cefac4db29
|
|
@@ -214,11 +214,55 @@
|
|
|
214
214
|
// assertions in test/views/wallet_connect_picker_test.rb, and rewriting
|
|
215
215
|
// those belongs with the behaviour change rather than riding along with
|
|
216
216
|
// new primitives.
|
|
217
|
+
// THE REDIRECT-TRANSPORT REGISTRY, guarded the same way canDeepLink is and
|
|
218
|
+
// for the same reason: a consumer that does not load
|
|
219
|
+
// solana_studio/redirect_provider.js has no registry, and an absent
|
|
220
|
+
// capability must not default to the permissive branch. Empty list, no
|
|
221
|
+
// rows, install rows keep their place.
|
|
222
|
+
get redirectProviders() {
|
|
223
|
+
var rp = window.SolanaStudio && window.SolanaStudio.redirectProvider;
|
|
224
|
+
if (!rp || typeof rp.all !== 'function') return [];
|
|
225
|
+
return rp.all().filter(function(w) { return w.can('browse'); });
|
|
226
|
+
},
|
|
227
|
+
// Wallets we can hand a phone to RIGHT NOW, and the honesty rule that
|
|
228
|
+
// shapes this list: a row is painted only when tapping it does something.
|
|
229
|
+
//
|
|
230
|
+
// The handoff is the browse deeplink — it opens this page inside the
|
|
231
|
+
// wallet's OWN in-app browser, where the wallet injects a provider and the
|
|
232
|
+
// ordinary detected-row flow above works unchanged. That needs no signing
|
|
233
|
+
// protocol on our side, which is exactly why it can ship before one.
|
|
234
|
+
//
|
|
235
|
+
// Excluded: a wallet already injected (the detected row above is a better
|
|
236
|
+
// offer than leaving the page), and Phantom when canDeepLink is true
|
|
237
|
+
// (its own row below is a full sign-in, not a handoff — offering both
|
|
238
|
+
// would be two Phantom rows racing each other).
|
|
239
|
+
get mobileHandoffs() {
|
|
240
|
+
if (!this.isMobile) return [];
|
|
241
|
+
var self = this;
|
|
242
|
+
return this.redirectProviders.filter(function(w) {
|
|
243
|
+
if (self.hasWallet(w.name)) return false;
|
|
244
|
+
if (w.key === 'phantom' && self.canDeepLink) return false;
|
|
245
|
+
return true;
|
|
246
|
+
});
|
|
247
|
+
},
|
|
248
|
+
// Navigate into the wallet's browser, carrying THIS page as the target so
|
|
249
|
+
// the user lands where they already were rather than on a home screen.
|
|
250
|
+
openInWallet(key) {
|
|
251
|
+
var rp = window.SolanaStudio && window.SolanaStudio.redirectProvider;
|
|
252
|
+
var w = rp && rp.forWallet(key);
|
|
253
|
+
if (!w) return;
|
|
254
|
+
window.location.href = w.browseUrl(window.location.href, window.location.origin);
|
|
255
|
+
},
|
|
217
256
|
get missingInstalls() {
|
|
218
257
|
var self = this;
|
|
258
|
+
var handoffs = this.mobileHandoffs.map(function(w) { return w.name.toLowerCase(); });
|
|
219
259
|
return this.installs.filter(function(i) {
|
|
220
260
|
if (self.hasWallet(i.name)) return false;
|
|
221
261
|
if (self.isMobile && self.canDeepLink && i.name === 'Phantom') return false;
|
|
262
|
+
// A wallet with a working handoff row must not ALSO offer a desktop
|
|
263
|
+
// download page. That pairing is what sent Solflare and Backpack users
|
|
264
|
+
// on a phone to solflare.com/download — a dead end with no error.
|
|
265
|
+
if (self.isMobile && handoffs.indexOf(i.name.toLowerCase()) !== -1) return false;
|
|
222
266
|
return true;
|
|
223
267
|
});
|
|
224
268
|
},
|
|
@@ -387,6 +431,23 @@
|
|
|
387
431
|
</span>
|
|
388
432
|
</button>
|
|
389
433
|
|
|
434
|
+
<%# Wallets we can hand this phone to. Rendered ABOVE the install rows on
|
|
435
|
+
purpose: a path that works belongs before a download page. Each row is
|
|
436
|
+
painted only when tapping it does something — see mobileHandoffs. %>
|
|
437
|
+
<template x-for="w in mobileHandoffs" :key="'handoff-' + w.key">
|
|
438
|
+
<button type="button" @click="openInWallet(w.key)"
|
|
439
|
+
class="w-full flex items-center gap-3 p-3 rounded-xl bg-surface-alt border border-strong hover:bg-surface transition text-left">
|
|
440
|
+
<svg class="w-9 h-9 shrink-0" aria-hidden="true"><use :href="'#se-wallet-' + brandIcon(w.name)"></use></svg>
|
|
441
|
+
<span class="font-semibold text-heading" x-text="w.name"></span>
|
|
442
|
+
<span class="ml-auto flex items-center gap-2">
|
|
443
|
+
<span class="text-xs text-muted uppercase tracking-wide">Open app</span>
|
|
444
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="w-4 h-4 text-muted">
|
|
445
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
|
|
446
|
+
</svg>
|
|
447
|
+
</span>
|
|
448
|
+
</button>
|
|
449
|
+
</template>
|
|
450
|
+
|
|
390
451
|
<%# Featured wallets that aren't installed — open the install page %>
|
|
391
452
|
<template x-for="i in missingInstalls" :key="i.name">
|
|
392
453
|
<a :href="i.url" target="_blank" rel="noopener noreferrer"
|
|
@@ -16,5 +16,5 @@ module SolanaStudio
|
|
|
16
16
|
# through the normal cycle. Splitting the version out is the same shape
|
|
17
17
|
# studio-engine already uses (lib/studio/version.rb) and hands each file back
|
|
18
18
|
# to its real owner: this one to the release, the gemspec to the PR.
|
|
19
|
-
VERSION = "0.
|
|
19
|
+
VERSION = "0.9.0"
|
|
20
20
|
end
|