Fix issue with subscribeOnce to reel's token-link not always returning a value

This commit is contained in:
Patrick O'Sullivan 2024-08-28 16:13:32 -05:00
parent a3d2aabf4e
commit a2441284f5

View File

@ -108,14 +108,16 @@
=+ !<(token=cord vase)
:_ this
=/ result=(unit [cord cord])
?. (~(has by our-metadata) token) ~
?. (~(has by our-metadata) token) `[token '']
`[token (url-for-token vic our.bowl token)]
~[[%pass [%token-link-want token ~] %agent [src.bowl %reel] %poke %reel-give-token-link !>(result)]]
%reel-give-token-link
=+ !<(result=(unit [cord cord]) vase)
?~ result `this
=/ [token=cord url=cord] u.result
:_ this
=/ [token=cord url=cord] u.result
?: =('' url)
~[[%give %fact ~[[%token-link (scot %p src.bowl) token ~]] %json !>(~)]]
~[[%give %fact ~[[%token-link (scot %p src.bowl) token ~]] %json !>(s+url)]]
==
::