-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
215 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package app | ||
|
||
import ( | ||
"encoding/base64" | ||
"github.com/algorandfoundation/algorun-tui/api" | ||
"github.com/algorandfoundation/algorun-tui/internal" | ||
tea "github.com/charmbracelet/bubbletea" | ||
) | ||
|
||
func EmitCreateShortLink(offline bool, part *api.ParticipationKey, state *internal.StateModel) tea.Cmd { | ||
if part == nil || state == nil { | ||
return nil | ||
} | ||
if offline { | ||
res, err := internal.GetOfflineShortLink(state.Http, internal.OfflineShortLinkBody{ | ||
Account: part.Address, | ||
Network: state.Status.Network, | ||
}) | ||
if err != nil { | ||
return func() tea.Msg { | ||
return err | ||
} | ||
} | ||
return func() tea.Msg { | ||
return res | ||
} | ||
} | ||
|
||
res, err := internal.GetOnlineShortLink(state.Http, internal.OnlineShortLinkBody{ | ||
Account: part.Address, | ||
VoteKeyB64: base64.RawURLEncoding.EncodeToString(part.Key.VoteParticipationKey), | ||
SelectionKeyB64: base64.RawURLEncoding.EncodeToString(part.Key.SelectionParticipationKey), | ||
StateProofKeyB64: base64.RawURLEncoding.EncodeToString(*part.Key.StateProofKey), | ||
VoteFirstValid: part.Key.VoteFirstValid, | ||
VoteLastValid: part.Key.VoteLastValid, | ||
KeyDilution: part.Key.VoteKeyDilution, | ||
Network: state.Status.Network, | ||
}) | ||
if err != nil { | ||
return func() tea.Msg { | ||
return err | ||
} | ||
} | ||
return func() tea.Msg { | ||
return res | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
ui/modals/transaction/testdata/Test_Snapshot/NotVisible.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
Sign this transaction to register your account keys: | ||
|
||
Mobile QR is available but it does not fit on screen. | ||
Adjust terminal dimensions or font size to display. | ||
|
||
-or- | ||
Click here to sign via Lora. | ||
Sign this transaction to register your account as online: | ||
|
||
Mobile QR is available but it does not fit on screen. | ||
Adjust terminal dimensions or font size to display. | ||
|
||
-or- | ||
Open this URL in your browser: | ||
https://b.nodekit.run/1234 |
53 changes: 27 additions & 26 deletions
53
ui/modals/transaction/testdata/Test_Snapshot/Offline.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
Sign this transaction to deregister your account keys: | ||
|
||
Scan the QR code with Pera or Defly | ||
(make sure you use the testnet-v1.0 network) | ||
|
||
█████████████████████████████ | ||
██ ▄▄▄▄▄ █▀█▄▀█▀█ ▀█ ▄▄▄▄▄ ██ | ||
██ █ █ ██▀▄▀ █ █ █ █ █ ██ | ||
██ █▄▄▄█ █▄▀▀▀█▀ ██ █▄▄▄█ ██ | ||
██▄▄▄▄▄▄▄█▄█▄█▄▀ ▀ █▄▄▄▄▄▄▄██ | ||
██▄▀ ▀ █▄▀▀ ▄█▄ █▀▀▀▀▄██ ▀██ | ||
███▀ ▄▀▄▄▀▀█▄█▄▀▀█▀▄▀▀▀▄█ ▄██ | ||
███▀█ ▀▄ █ ▄▀▄▄█▄█▀ ██▀ ▀██ | ||
██▄▀█ ▄▄ █▄ █▀ ██▄▀█▄▄█▄▄██ | ||
██▄███▄█▄▄▀▄▀█ █▀ ▄▄▄ █▀ ██ | ||
██ ▄▄▄▄▄ ██▄ ▀▀▀▀█ █▄█ ██ ██ | ||
██ █ █ █▄ ▀█ ▄▀▀ ▄▄ ▀█████ | ||
██ █▄▄▄█ █▄▀ █▄▀ ▀▄▀▄ ▄▄▀▄██ | ||
██▄▄▄▄▄▄▄█▄█▄██▄█▄▄▄▄▄███▄▄██ | ||
|
||
-or- | ||
|
||
Click here to sign via Lora. | ||
|
||
Note: this will take effect after 320 rounds (15 mins.) | ||
Please keep your node online during this cooldown period. | ||
Sign this transaction to register your account as offline: | ||
|
||
Scan the QR code with Pera or Defly | ||
(make sure you use the testnet-v1.0 network) | ||
|
||
█████████████████████████████ | ||
██ ▄▄▄▄▄ █▀█▄▀█▀█ ▀█ ▄▄▄▄▄ ██ | ||
██ █ █ ██▀▄▀ █ █ █ █ █ ██ | ||
██ █▄▄▄█ █▄▀▀▀█▀ ██ █▄▄▄█ ██ | ||
██▄▄▄▄▄▄▄█▄█▄█▄▀ ▀ █▄▄▄▄▄▄▄██ | ||
██▄▀ ▀ █▄▀▀ ▄█▄ █▀▀▀▀▄██ ▀██ | ||
███▀ ▄▀▄▄▀▀█▄█▄▀▀█▀▄▀▀▀▄█ ▄██ | ||
███▀█ ▀▄ █ ▄▀▄▄█▄█▀ ██▀ ▀██ | ||
██▄▀█ ▄▄ █▄ █▀ ██▄▀█▄▄█▄▄██ | ||
██▄███▄█▄▄▀▄▀█ █▀ ▄▄▄ █▀ ██ | ||
██ ▄▄▄▄▄ ██▄ ▀▀▀▀█ █▄█ ██ ██ | ||
██ █ █ █▄ ▀█ ▄▀▀ ▄▄ ▀█████ | ||
██ █▄▄▄█ █▄▀ █▄▀ ▀▄▀▄ ▄▄▀▄██ | ||
██▄▄▄▄▄▄▄█▄█▄██▄█▄▄▄▄▄███▄▄██ | ||
|
||
-or- | ||
|
||
Open this URL in your browser: | ||
https://b.nodekit.run/1234 | ||
|
||
Note: this will take effect after 320 rounds (~15 min.) | ||
Please keep your node running during this cooldown period. |
Oops, something went wrong.