3434 cfg := cliConfig .Global ()
3535 npa := common .GetNPASelection (cfg )
3636
37- if npa .Account == nil {
38- cobra .CheckErr ("no accounts configured in your wallet" )
39- }
37+ npa .MustHaveAccount ()
4038
4139 // Load the account and ensure it corresponds to the entity.
4240 acc := common .LoadAccount (cfg , npa .AccountName )
8179 txCfg := common .GetTransactionConfig ()
8280 filename := args [0 ]
8381
84- if npa .Account == nil {
85- cobra .CheckErr ("no accounts configured in your wallet" )
86- }
82+ npa .MustHaveAccount ()
8783
8884 // When not in offline mode, connect to the given network endpoint.
8985 ctx := context .Background ()
@@ -127,7 +123,7 @@ var (
127123 sigTx , err := common .SignConsensusTransaction (ctx , npa , acc , conn , tx )
128124 cobra .CheckErr (err )
129125
130- common .BroadcastOrExportTransaction (ctx , npa . ParaTime , conn , sigTx , nil , nil )
126+ common .BroadcastOrExportTransaction (ctx , npa , conn , sigTx , nil , nil )
131127 },
132128 }
133129
@@ -140,9 +136,7 @@ var (
140136 npa := common .GetNPASelection (cfg )
141137 txCfg := common .GetTransactionConfig ()
142138
143- if npa .Account == nil {
144- cobra .CheckErr ("no accounts configured in your wallet" )
145- }
139+ npa .MustHaveAccount ()
146140
147141 // When not in offline mode, connect to the given network endpoint.
148142 ctx := context .Background ()
@@ -160,7 +154,7 @@ var (
160154 sigTx , err := common .SignConsensusTransaction (ctx , npa , acc , conn , tx )
161155 cobra .CheckErr (err )
162156
163- common .BroadcastOrExportTransaction (ctx , npa . ParaTime , conn , sigTx , nil , nil )
157+ common .BroadcastOrExportTransaction (ctx , npa , conn , sigTx , nil , nil )
164158 },
165159 }
166160
@@ -174,9 +168,7 @@ var (
174168 cfg := cliConfig .Global ()
175169 npa := common .GetNPASelection (cfg )
176170
177- if npa .Account == nil {
178- cobra .CheckErr ("no accounts configured in your wallet" )
179- }
171+ npa .MustHaveAccount ()
180172
181173 var fsRegistry metadataRegistry.MutableProvider
182174 switch registryPath {
0 commit comments