File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ func newStaticAddress(ctx *cli.Context) error {
6060 return cli .ShowCommandHelp (ctx , "new" )
6161 }
6262
63+ err := displayNewAddressWarning ()
64+ if err != nil {
65+ return err
66+ }
67+
6368 client , cleanup , err := getClient (ctx )
6469 if err != nil {
6570 return err
@@ -636,3 +641,23 @@ func depositsToOutpoints(deposits []*looprpc.Deposit) []string {
636641
637642 return outpoints
638643}
644+
645+ func displayNewAddressWarning () error {
646+ fmt .Printf ("\n WARNING: Be aware that loosing your l402.token file in " +
647+ ".loop under your home directory \n will take your ability to " +
648+ "spend funds sent to the static address via loop-ins or " +
649+ "\n withdrawals. You will have to wait until the deposit " +
650+ "expires and your loop client \n sweeps the funds back to your " +
651+ "lnd wallet. The deposit expiry could be months in the " +
652+ "future.\n " )
653+
654+ fmt .Printf ("\n CONTINUE WITH NEW ADDRESS? (y/n): " )
655+
656+ var answer string
657+ fmt .Scanln (& answer )
658+ if answer == "y" {
659+ return nil
660+ }
661+
662+ return errors .New ("new address creation canceled" )
663+ }
You can’t perform that action at this time.
0 commit comments