This won't be possible in Australia I think. Once a car is written off it can never be re-registered except for the circumstances below:
The vehicle must be in an exempt category. The exempt categories are:
-hail damaged vehicles, where you were the registered operator for more than 28 days before the vehicle was hail damaged
-a vehicle that you inherited in a will or letters of administration
-a vehicle that you owned for at least 28 days before it was damaged.
Guess it's to stop people doing just this - buying a cheap written-off vehicle and fixing it to sell or to use.
Easy enough to simply buy a older used Leaf (I actually prefer the 1st Gen for its character) with a bad battery cheap, stick the new pack in it, pair it, and then strip and sell the rest of the wrecked Leaf for spares.