Battery wiring

I’m trying to connect a battery to the onboard circuit of the mkr1000 but the smell and smoke does not bode well for the future of the charging circuit (the rest of the board is still working)

I have attached a photo of the battery I have. I’ve looked around online and i’m wondering if the battery needs to be connected with +ve & gnd in the correct terminals?

Assuming the wires are correct the gnd is connecting to the terminal closest the pwr & chrg led of the mkr1000.

Turns out this was exactly the problem. The Arduino needs the battery connected with +ve & gnd on the right pins (unsurprisingly). My battery arrived with the pins in the connector the opposite way to what the arduino expected.

For anyone who comes across this the mkr1000 wants the battery gnd to be in pin 2 which is the pin closest to the header connections. Pin 1 is the +ve and is the pin closest to the pwr + chrg led's

Comparing the schematics of the mkr1000 & the mkrwifi1010 it looks like they might have fixed this issues by putting a diode on pin 2 and connecting to the Batt+