Code Duplication    Length = 16-16 lines in 2 locations

src/BlocktrailSDK.php 2 locations

@@ 979-994 (lines=16) @@
976
     * @return mixed
977
     * @throws \Exception
978
     */
979
    public function storeNewWalletV2($identifier, $primaryPublicKey, $backupPublicKey, $encryptedPrimarySeed, $encryptedSecret, $recoverySecret, $checksum, $keyIndex) {
980
        $data = [
981
            'identifier' => $identifier,
982
            'wallet_version' => Wallet::WALLET_VERSION_V2,
983
            'primary_public_key' => $primaryPublicKey,
984
            'backup_public_key' => $backupPublicKey,
985
            'encrypted_primary_seed' => $encryptedPrimarySeed,
986
            'encrypted_secret' => $encryptedSecret,
987
            'recovery_secret' => $recoverySecret,
988
            'checksum' => $checksum,
989
            'key_index' => $keyIndex
990
        ];
991
992
        $response = $this->client->post("wallet", null, $data, RestClient::AUTH_HTTP_SIG);
993
        return self::jsonDecode($response->body(), true);
994
    }
995
996
    /**
997
     * create wallet using the API
@@ 1010-1025 (lines=16) @@
1007
     * @return mixed
1008
     * @throws \Exception
1009
     */
1010
    public function storeNewWalletV3($identifier, $primaryPublicKey, $backupPublicKey, $encryptedPrimarySeed, $encryptedSecret, $recoverySecret, $checksum, $keyIndex) {
1011
        $data = [
1012
            'identifier' => $identifier,
1013
            'wallet_version' => Wallet::WALLET_VERSION_V3,
1014
            'primary_public_key' => $primaryPublicKey,
1015
            'backup_public_key' => $backupPublicKey,
1016
            'encrypted_primary_seed' => $encryptedPrimarySeed,
1017
            'encrypted_secret' => $encryptedSecret,
1018
            'recovery_secret' => $recoverySecret,
1019
            'checksum' => $checksum,
1020
            'key_index' => $keyIndex
1021
        ];
1022
1023
        $response = $this->client->post("wallet", null, $data, RestClient::AUTH_HTTP_SIG);
1024
        return self::jsonDecode($response->body(), true);
1025
    }
1026
1027
    /**
1028
     * upgrade wallet to use a new account number