Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into update-gonuts
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Jan 15, 2025
2 parents c3c7f2c + bd81edd commit db7cbb4
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 30 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ LDK logs:

### Docker

Alby provides container images for each release. Please make sure to use a persistent volume. The lightning state and application state is persisted to disk.

#### From Alby's Container Registry

_Tested on Linux only_
Expand Down
2 changes: 1 addition & 1 deletion apps/apps_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewAppsService(db *gorm.DB, eventPublisher events.EventPublisher, keys keys

func (svc *appsService) CreateApp(name string, pubkey string, maxAmountSat uint64, budgetRenewal string, expiresAt *time.Time, scopes []string, isolated bool, metadata map[string]interface{}) (*db.App, string, error) {
if isolated && (slices.Contains(scopes, constants.SIGN_MESSAGE_SCOPE)) {
// cannot sign messages because the isolated app is a custodial subaccount
// cannot sign messages because the isolated app is a custodial sub-wallet
return nil, "", errors.New("isolated app cannot have sign_message scope")
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 50 additions & 1 deletion frontend/src/components/SuggestedAppData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import damus from "src/assets/suggested-apps/damus.png";
import hablanews from "src/assets/suggested-apps/habla-news.png";
import kiwi from "src/assets/suggested-apps/kiwi.png";
import lume from "src/assets/suggested-apps/lume.png";
import nostrcheckserver from "src/assets/suggested-apps/nostrcheck-server.png";
import nostrudel from "src/assets/suggested-apps/nostrudel.png";
import nostur from "src/assets/suggested-apps/nostur.png";
import paperScissorsHodl from "src/assets/suggested-apps/paper-scissors-hodl.png";
Expand Down Expand Up @@ -52,7 +53,7 @@ export const suggestedApps: SuggestedApp[] = [
{
id: "uncle-jim",
title: "Friends & Family",
description: "Subaccounts powered by your Hub",
description: "Sub-wallets powered by your Hub",
internal: true,
logo: uncleJim,
},
Expand Down Expand Up @@ -579,6 +580,54 @@ export const suggestedApps: SuggestedApp[] = [
</>
),
},
{
id: "nostrcheck-server",
title: "Nostrcheck Server",
description: "Sovereign Nostr services",
webLink: "https://github.com/quentintaranpino/nostrcheck-server",
logo: nostrcheckserver,
guide: (
<>
<div>
<h3 className="font-medium">In Alby Hub</h3>
<ul className="list-inside text-muted-foreground">
<li>
1. Click{" "}
<Link
to="/apps/new?app=nostrcheck-server"
className="font-medium text-foreground underline"
>
Connect to Nostrcheck Server
</Link>
</li>
<li>2. Set app's wallet permissions (full access recommended)</li>
</ul>
</div>
<div>
<h3 className="font-medium">In Nostrcheck server</h3>
<ul className="list-inside text-muted-foreground">
<li>
3. Go to{" "}
<span className="font-medium text-foreground">Settings</span> and
choose{" "}
<span className="font-medium text-foreground">Payments</span> tab
</li>
<li>
4. Scroll to Nostr wallet connect settings and paste the{" "}
<span className="font-medium text-foreground">
connection secret
</span>{" "}
from Alby Hub
</li>
<li>
5. Press the{" "}
<span className="font-medium text-foreground">Save</span> button
</li>
</ul>
</div>
</>
),
},
{
id: "nostrudel",
title: "noStrudel",
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/TransactionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ function TransactionItem({ tx }: Props) {
className={cn(
"flex justify-center items-center rounded-full w-10 h-10 md:w-14 md:h-14 relative",
tx.state === "failed"
? "bg-red-100 dark:bg-red-950"
? "bg-red-100 dark:bg-rose-950"
: tx.state === "pending"
? "bg-blue-100 dark:bg-blue-900"
? "bg-blue-500 dark:bg-sky-500"
: type === "outgoing"
? "bg-orange-100 dark:bg-orange-950"
? "bg-orange-100 dark:bg-amber-950"
: "bg-green-100 dark:bg-emerald-950"
)}
>
Expand All @@ -83,12 +83,12 @@ function TransactionItem({ tx }: Props) {
className={cn(
"w-6 h-6 md:w-8 md:h-8",
tx.state === "failed"
? "stroke-rose-400 dark:stroke-red-600"
? "stroke-red-500 dark:stroke-rose-500"
: tx.state === "pending"
? "stroke-blue-500"
? "stroke-blue-500 dark:stroke-sky-500"
: type === "outgoing"
? "stroke-orange-400 dark:stroke-amber-600"
: "stroke-green-400 dark:stroke-emerald-500"
? "stroke-orange-500 dark:stroke-amber-500"
: "stroke-green-500 dark:stroke-teal-500"
)}
/>
{app && (
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/screens/internal-apps/UncleJim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function UncleJim() {
setConnectionSecret(createAppResponse.pairingUri);
setAppPublicKey(createAppResponse.pairingPublicKey);

toast({ title: "New subaccount created for " + name });
toast({ title: "New sub-wallet created for " + name });
} catch (error) {
handleRequestError(toast, "Failed to create app", error);
}
Expand All @@ -87,7 +87,7 @@ export function UncleJim() {
<div className="grid gap-5">
<AppHeader
title="Friends & Family"
description="Create subaccounts for your friends and family powered by your Hub"
description="Create sub-wallets for your friends and family powered by your Hub"
/>
{!connectionSecret && (
<>
Expand All @@ -109,7 +109,7 @@ export function UncleJim() {
/>
</div>
<LoadingButton loading={isLoading} type="submit">
Create Subaccount
Create Sub-wallet
</LoadingButton>
</form>

Expand Down
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/getAlby/ldk-node-go v0.0.0-20250106052504-d4191410486f
github.com/go-gormigrate/gormigrate/v2 v2.1.3
github.com/labstack/echo/v4 v4.13.0
github.com/nbd-wtf/go-nostr v0.45.0
github.com/nbd-wtf/go-nostr v0.46.0
github.com/nbd-wtf/ln-decodepay v1.13.0
github.com/orandin/lumberjackrus v1.0.1
github.com/stretchr/testify v1.10.0
Expand All @@ -21,9 +21,9 @@ require (
golang.org/x/crypto v0.31.0
golang.org/x/oauth2 v0.24.0
google.golang.org/grpc v1.68.0
gopkg.in/DataDog/dd-trace-go.v1 v1.70.2
gopkg.in/DataDog/dd-trace-go.v1 v1.70.3
gopkg.in/macaroon.v2 v2.1.0
gorm.io/driver/sqlite v1.5.6
gorm.io/driver/sqlite v1.5.7
gorm.io/gorm v1.25.12
)

Expand Down Expand Up @@ -56,6 +56,7 @@ require (
github.com/btcsuite/winsvc v1.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coder/websocket v1.8.12 // indirect
github.com/containerd/continuity v0.4.3 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
Expand All @@ -76,9 +77,6 @@ require (
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-sql-driver/mysql v1.8.1 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.4.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
Expand Down
20 changes: 8 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA=
github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8=
github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
Expand Down Expand Up @@ -230,12 +232,6 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
Expand Down Expand Up @@ -531,8 +527,8 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nbd-wtf/go-nostr v0.45.0 h1:4WaMg0Yvda9gBcyRq9KtI32lPeFY8mbX0eFlfdnLrSE=
github.com/nbd-wtf/go-nostr v0.45.0/go.mod h1:m0ID2gSA2Oak/uaPnM1uN22JhDRZS4UVJG2c8jo19rg=
github.com/nbd-wtf/go-nostr v0.46.0 h1:aR+xXEC6MPutNMIRhNdi+2iBPEHW7SO10sFaOAVSz3Y=
github.com/nbd-wtf/go-nostr v0.46.0/go.mod h1:xVNOqkn0GImeTmaF6VDwgYsuSkfG3yrIbd0dT6NZDIQ=
github.com/nbd-wtf/ln-decodepay v1.13.0 h1:ic32UwT6cBVbLw72fQ7vr0nTMziYTj67baQ2COwlxZk=
github.com/nbd-wtf/ln-decodepay v1.13.0/go.mod h1:SNcdOd7Mv7+PY6Q5E/flUAOfnFdr/W/PK2O6wyzpra8=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
Expand Down Expand Up @@ -972,8 +968,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0=
google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA=
gopkg.in/DataDog/dd-trace-go.v1 v1.70.2 h1:MVckfRl7BcC9cf5X35NK3c4Uop5BKZrfAjKWutqtXdk=
gopkg.in/DataDog/dd-trace-go.v1 v1.70.2/go.mod h1:CVUgctrrPGeB+OSjgyt56CNH5QxQwW3t11QU8R1LQjQ=
gopkg.in/DataDog/dd-trace-go.v1 v1.70.3 h1:lXHrxMpQZjxNdA8mGRfgMtwF/O6qIut5QjL7LICUVJ4=
gopkg.in/DataDog/dd-trace-go.v1 v1.70.3/go.mod h1:CVUgctrrPGeB+OSjgyt56CNH5QxQwW3t11QU8R1LQjQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down Expand Up @@ -1015,8 +1011,8 @@ gorm.io/driver/mysql v1.5.6 h1:Ld4mkIickM+EliaQZQx3uOJDJHtrd70MxAUqWqlx3Y8=
gorm.io/driver/mysql v1.5.6/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM=
gorm.io/driver/postgres v1.5.0 h1:u2FXTy14l45qc3UeCJ7QaAXZmZfDDv0YrthvmRq1l0U=
gorm.io/driver/postgres v1.5.0/go.mod h1:FUZXzO+5Uqg5zzwzv4KK49R8lvGIyscBOqYrtI1Ce9A=
gorm.io/driver/sqlite v1.5.6 h1:fO/X46qn5NUEEOZtnjJRWRzZMe8nqJiQ9E+0hi+hKQE=
gorm.io/driver/sqlite v1.5.6/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4=
gorm.io/driver/sqlite v1.5.7 h1:8NvsrhP0ifM7LX9G4zPB97NwovUakUxc+2V2uuf3Z1I=
gorm.io/driver/sqlite v1.5.7/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4=
gorm.io/driver/sqlserver v1.5.4 h1:xA+Y1KDNspv79q43bPyjDMUgHoYHLhXYmdFcYPobg8g=
gorm.io/driver/sqlserver v1.5.4/go.mod h1:+frZ/qYmuna11zHPlh5oc2O6ZA/lS88Keb0XSH1Zh/g=
gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
Expand Down
3 changes: 3 additions & 0 deletions wails/wails_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ func (app *WailsApp) WailsRequestRouter(route string, method string, body string
if err != nil {
return WailsRequestRouterResponse{Body: nil, Error: err.Error()}
}
if nodeStatus == nil {
return WailsRequestRouterResponse{Body: nil, Error: ""}
}
return WailsRequestRouterResponse{Body: *nodeStatus, Error: ""}
case "/api/info":
infoResponse, err := app.api.GetInfo(ctx)
Expand Down

0 comments on commit db7cbb4

Please sign in to comment.