@@ -36,10 +36,10 @@ var (
3636	_                            secp256k1fx.UnsignedTx  =  (* UnsignedExportTx )(nil )
3737	ErrExportNonAVAXInputBanff                          =  errors .New ("export input cannot contain non-AVAX in Banff" )
3838	ErrExportNonAVAXOutputBanff                         =  errors .New ("export output cannot contain non-AVAX in Banff" )
39+ 	ErrInsufficientFunds                                =  errors .New ("insufficient funds" )
3940	ErrInvalidNonce                                     =  errors .New ("invalid nonce" )
4041	ErrNoExportOutputs                                  =  errors .New ("tx has no export outputs" )
4142	errOverflowExport                                   =  errors .New ("overflow when computing export amount + txFee" )
42- 	errInsufficientFunds                                =  errors .New ("insufficient funds" )
4343)
4444
4545// UnsignedExportTx is an unsigned ExportTx 
@@ -323,14 +323,14 @@ func (utx *UnsignedExportTx) EVMStateTransfer(ctx *snow.Context, state StateDB)
323323				uint256 .NewInt (X2CRate .Uint64 ()),
324324			)
325325			if  state .GetBalance (from .Address ).Cmp (amount ) <  0  {
326- 				return  errInsufficientFunds 
326+ 				return  ErrInsufficientFunds 
327327			}
328328			state .SubBalance (from .Address , amount )
329329		} else  {
330330			log .Debug ("export_tx" , "dest" , utx .DestinationChain , "addr" , from .Address , "amount" , from .Amount , "assetID" , from .AssetID )
331331			amount  :=  new (big.Int ).SetUint64 (from .Amount )
332332			if  state .GetBalanceMultiCoin (from .Address , common .Hash (from .AssetID )).Cmp (amount ) <  0  {
333- 				return  errInsufficientFunds 
333+ 				return  ErrInsufficientFunds 
334334			}
335335			state .SubBalanceMultiCoin (from .Address , common .Hash (from .AssetID ), amount )
336336		}
@@ -393,7 +393,7 @@ func getSpendableFunds(
393393	}
394394
395395	if  amount  >  0  {
396- 		return  nil , nil , errInsufficientFunds 
396+ 		return  nil , nil , ErrInsufficientFunds 
397397	}
398398
399399	return  inputs , signers , nil 
@@ -487,7 +487,7 @@ func getSpendableAVAXWithFee(
487487	}
488488
489489	if  amount  >  0  {
490- 		return  nil , nil , errInsufficientFunds 
490+ 		return  nil , nil , ErrInsufficientFunds 
491491	}
492492
493493	return  inputs , signers , nil 
0 commit comments