@@ -175,11 +175,10 @@ class WalletImpl : public Wallet
175175 }
176176 int64_t getKeysLeftSinceAutoBackup () override { return m_wallet->nKeysLeftSinceAutoBackup ; }
177177 std::string getWalletName () override { return m_wallet->GetName (); }
178- bool getNewDestination (const std::string label, CTxDestination& dest ) override
178+ BResult<CTxDestination> getNewDestination (const std::string label) override
179179 {
180180 LOCK (m_wallet->cs_wallet );
181- bilingual_str error;
182- return m_wallet->GetNewDestination (label, dest, error);
181+ return m_wallet->GetNewDestination (label);
183182 }
184183 bool getPubKey (const CScript& script, const CKeyID& address, CPubKey& pub_key) override
185184 {
@@ -288,22 +287,20 @@ class WalletImpl : public Wallet
288287 LOCK (m_wallet->cs_wallet );
289288 return m_wallet->ListProTxCoins ();
290289 }
291- CTransactionRef createTransaction (const std::vector<CRecipient>& recipients,
290+ BResult< CTransactionRef> createTransaction (const std::vector<CRecipient>& recipients,
292291 const CCoinControl& coin_control,
293292 bool sign,
294293 int & change_pos,
295- CAmount& fee,
296- bilingual_str& fail_reason) override
294+ CAmount& fee) override
297295 {
298296 LOCK (m_wallet->cs_wallet );
299- FeeCalculation fee_calc_out;
300- std::optional<CreatedTransactionResult> txr = CreateTransaction (*m_wallet, recipients, change_pos,
301- fail_reason, coin_control, fee_calc_out, sign);
302- if (!txr) return {};
303- fee = txr->fee ;
304- change_pos = txr->change_pos ;
297+ const auto & res = CreateTransaction (*m_wallet, recipients, change_pos, coin_control, sign);
298+ if (!res) return res.GetError ();
299+ const auto & txr = res.GetObj ();
300+ fee = txr.fee ;
301+ change_pos = txr.change_pos ;
305302
306- return txr-> tx ;
303+ return txr. tx ;
307304 }
308305 void commitTransaction (CTransactionRef tx,
309306 WalletValueMap value_map,
0 commit comments