From e68df6d0d63c4c74ff81819488d8d6ebad46d46b Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Fri, 24 Mar 2023 23:22:30 +0000 Subject: [PATCH] fixup! feat(cosmic-swingset): basic snapshot wiring Handle SimApp not getting snapshotManager wired --- golang/cosmos/app/app.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/golang/cosmos/app/app.go b/golang/cosmos/app/app.go index 41d11d2c86f..e1e19a37ae0 100644 --- a/golang/cosmos/app/app.go +++ b/golang/cosmos/app/app.go @@ -761,9 +761,11 @@ func NewAgoricApp( app.ScopedVibcKeeper = scopedVibcKeeper app.ScopedTransferKeeper = scopedTransferKeeper app.ScopedICAHostKeeper = scopedICAHostKeeper - err = app.SnapshotManager().RegisterExtensions(&app.SwingSetSnapshotter) - if err != nil { - panic(fmt.Errorf("failed to register snapshot extension: %s", err)) + snapshotManager := app.SnapshotManager() + if snapshotManager != nil { + if err = snapshotManager.RegisterExtensions(&app.SwingSetSnapshotter); err != nil { + panic(fmt.Errorf("failed to register snapshot extension: %s", err)) + } } return app